selamlar,
Sunucuma 14 gb lik bir sql zipi upload ediyorum fakat %1 bile olmadan hataya düşüyor.
Zipin çözülmüş hali 40 GB
Farklı resellerlardaki domainlere aktarıyorum mecbur ama onlardada çok yavaş ilerliyor.
En hızlı nasıl upload edebilirim?
Putty ile ssh daha hızlı olabilirmi ?
Ssh ile upload kodu neydi ?

SORUNU PHP + JQUERY İLE ÇÖZDÜM.
Fillezilla bile 120 kps ile upload ediyordu.


upload.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Upload Hız Testi</title>
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <style>
    #progressBar {
      width: 100%;
      background-color: #ddd;
      border-radius: 10px;
    }
    #progressBar div {
      height: 20px;
      background-color: #4caf50;
      width: 0%;
      border-radius: 10px;
    }
  </style>
</head>
<body>

<h2>Dosya Yükleme Testi</h2>
<input type="file" id="fileInput"><br><br>
<button id="uploadBtn">Yüklemeye Başla</button>

<div id="progressBar"><div></div></div>
<p id="statusText">Hazır</p>

<script>
$(document).ready(function() {
  $('#uploadBtn').click(function() {
    let file = $('#fileInput')[0].files[0];
    if (!file) return alert("Lütfen bir dosya seçin.");

    let formData = new FormData();
    formData.append("file", file);

    let startTime = new Date().getTime();

    let xhr = new XMLHttpRequest();
    xhr.upload.addEventListener("progress", function(e) {
      if (e.lengthComputable) {
        let percent = (e.loaded / e.total) * 100;
        let currentTime = new Date().getTime();
        let timeElapsed = (currentTime - startTime) / 1000; // saniye
        let mbUploaded = e.loaded / 1024 / 1024;
        let speedMbps = ((e.loaded * 8) / 1024 / 1024) / timeElapsed;

        $('#progressBar div').css('width', percent + '%');
        $('#statusText').html(
          `Yüklenen: ${mbUploaded.toFixed(2)} MB<br>` +
          `Hız: ${speedMbps.toFixed(2)} Mbps`
        );
      }
    });

    xhr.upload.addEventListener("load", function() {
      $('#statusText').append("<br>Yükleme tamamlandı.");
    });

    xhr.open("POST", "upload.php");
    xhr.send(formData);
  });
});
</script>

</body>
</html>
upload.php 'ye eklenecek kod
<?php
if (isset($_FILES['file'])) {
    $fileTmp = $_FILES['file']['tmp_name'];
    $fileName = basename($_FILES['file']['name']);
    $targetPath = __DIR__ . '/' . $fileName;

    $allowedExtension = '.sql.gz';
    if (substr($fileName, -strlen($allowedExtension)) !== $allowedExtension) {
        echo "❌ Yalnızca .sql.gz uzantılı dosyalar yüklenebilir.";
        exit;
    }

    if (move_uploaded_file($fileTmp, $targetPath)) {
        echo "✅ Yükleme başarılı: $fileName<br>";
        echo "📁 Kaydedildiği yer: $targetPath";
    } else {
        echo "❌ move_uploaded_file başarısız oldu.<br>";
        echo "Geçici dosya: $fileTmp<br>";
        echo "Hedef yol: $targetPath<br>";
        echo "PHP upload ayarlarını kontrol edin.";
    }
} else {
    echo "❌ Dosya alınamadı.";
}
?>
%100 ÇÖZDÜM

CHUNK UPLOAD OLAYI İLE
<script>
    const chunkSize = 100 * 1024 * 1024; // 100 MB

    function upload() {
        const file = document.getElementById('fileInput').files[0];
        if (!file) return alert("Dosya seçilmedi");

        const totalChunks = Math.ceil(file.size / chunkSize);
        let currentChunk = 0;

        const uploadNextChunk = () => {
            const start = currentChunk * chunkSize;
            const end = Math.min(start + chunkSize, file.size);
            const chunk = file.slice(start, end);

            const formData = new FormData();
            formData.append("chunk", chunk);
            formData.append("name", file.name);
            formData.append("chunkIndex", currentChunk);
            formData.append("totalChunks", totalChunks);

            const xhr = new XMLHttpRequest();
            xhr.open("POST", "chunk_upload.php", true);

            xhr.onload = function () {
                if (xhr.status === 200) {
                    currentChunk++;
                    document.getElementById("status").innerText = `Yükleniyor: ${((currentChunk / totalChunks) * 100).toFixed(2)}%`;

                    if (currentChunk < totalChunks) {
                        uploadNextChunk();
                    } else {
                        document.getElementById("status").innerText = "✅ Yükleme tamamlandı.";
                    }
                } else {
                    document.getElementById("status").innerText = "❌ Hata oluştu.";
                }
            };

            xhr.send(formData);
        };

        uploadNextChunk();
    }
</script>

PHP DOSYASINA YAZILACAK KODLAR
<?php
$targetDir = __DIR__ . "/uploads/";
if (!is_dir($targetDir)) mkdir($targetDir, 0777, true);

$name = $_POST['name'];
$chunkIndex = intval($_POST['chunkIndex']);
$totalChunks = intval($_POST['totalChunks']);

$tempFile = $_FILES['chunk']['tmp_name'];
$targetFile = $targetDir . $name . ".part" . $chunkIndex;

move_uploaded_file($tempFile, $targetFile);

// Son parça yüklendiyse birleştir
if ($chunkIndex + 1 === $totalChunks) {
    $finalFile = $targetDir . $name;
    $output = fopen($finalFile, 'wb');

    for ($i = 0; $i < $totalChunks; $i++) {
        $part = $targetDir . $name . ".part" . $i;
        $in = fopen($part, 'rb');
        stream_copy_to_stream($in, $output);
        fclose($in);
        unlink($part);
    }

    fclose($output);
    echo "✅ Dosya birleştirildi: " . $name;
} else {
    echo "🧩 Parça {$chunkIndex} alındı.";
}