directadmin:cara-transfer-memindahkan-data-antar-akun
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
directadmin:cara-transfer-memindahkan-data-antar-akun [2018/03/26 22:58] – created kbadmin | directadmin:cara-transfer-memindahkan-data-antar-akun [2018/07/11 09:43] (current) – kbadmin | ||
---|---|---|---|
Line 12: | Line 12: | ||
Setelah data anda pindahkan ke public_html otomatis data bisa diakses secara umum. Maka sekarang silahkan login ke akun dimana anda ingin mengcopykan file backup tersebut. | Setelah data anda pindahkan ke public_html otomatis data bisa diakses secara umum. Maka sekarang silahkan login ke akun dimana anda ingin mengcopykan file backup tersebut. | ||
+ | Untuk mendownload file anda bisa membuat file downloader dengan cara berikut ini. | ||
+ | - Login ke Directadmin | ||
+ | - Masuk ke file manager kemudian masuk ke public_html | ||
+ | - Dibagian bawah klik create new file dengan nama terserah anda kemudian isi dengan script ini < | ||
+ | /** | ||
+ | * Copy remote file over HTTP one small chunk at a time. | ||
+ | * | ||
+ | * @param $infile The full URL to the remote file | ||
+ | * @param $outfile The path where to save the file | ||
+ | */ | ||
+ | function copyfile_chunked($infile, | ||
+ | $chunksize = 10 * (1024 * 1024); // 10 Megs | ||
+ | /** | ||
+ | * parse_url breaks a part a URL into it's parts, i.e. host, path, | ||
+ | * query string, etc. | ||
+ | */ | ||
+ | $parts = parse_url($infile); | ||
+ | $i_handle = fsockopen($parts[' | ||
+ | $o_handle = fopen($outfile, | ||
+ | |||
+ | if ($i_handle == false || $o_handle == false) { | ||
+ | return false; | ||
+ | } | ||
+ | |||
+ | if (!empty($parts[' | ||
+ | $parts[' | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Send the request to the server for the file | ||
+ | */ | ||
+ | $request = "GET {$parts[' | ||
+ | $request .= "Host: {$parts[' | ||
+ | $request .= " | ||
+ | $request .= " | ||
+ | $request .= " | ||
+ | fwrite($i_handle, | ||
+ | |||
+ | /** | ||
+ | * Now read the headers from the remote server. We'll need | ||
+ | * to get the content length. | ||
+ | */ | ||
+ | $headers = array(); | ||
+ | while(!feof($i_handle)) { | ||
+ | $line = fgets($i_handle); | ||
+ | if ($line == " | ||
+ | $headers[] = $line; | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Look for the Content-Length header, and get the size | ||
+ | * of the remote file. | ||
+ | */ | ||
+ | $length = 0; | ||
+ | foreach($headers as $header) { | ||
+ | if (stripos($header, | ||
+ | $length = (int)str_replace(' | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Start reading in the remote file, and writing it to the | ||
+ | * local file one chunk at a time. | ||
+ | */ | ||
+ | $cnt = 0; | ||
+ | while(!feof($i_handle)) { | ||
+ | $buf = ''; | ||
+ | $buf = fread($i_handle, | ||
+ | $bytes = fwrite($o_handle, | ||
+ | if ($bytes == false) { | ||
+ | return false; | ||
+ | } | ||
+ | $cnt += $bytes; | ||
+ | |||
+ | /** | ||
+ | * We're done reading when we've reached the conent length | ||
+ | */ | ||
+ | if ($cnt >= $length) break; | ||
+ | } | ||
+ | |||
+ | fclose($i_handle); | ||
+ | fclose($o_handle); | ||
+ | return $cnt; | ||
+ | } | ||
+ | copyfile_chunked(' | ||
+ | ?> | ||
+ | </ | ||
+ | - pada bagian akhir script namafile.tar.gz ubah sesuai nama file hasil backup tersebut. | ||
+ | - Selanjutnya akses script php tersebut via browser dan script otomatis mendownload file backup tersebut. | ||
+ | |||
+ | ===== - Merestore File Backup ===== | ||
+ | Setelah proses selesai dan file backup sudah masuk ke akun hosting baru anda, maka selanjutnya pindahkan file ke folder backup. caranya ikuti tahapan berikut ini : | ||
+ | - Masuk ke file manager dan cari file terdownload tsb dan Klik centang pada file kemudian klik add to clipboard | ||
+ | - Masuk ke file manager kemudian cari folder backups | ||
+ | - Apabila tidak menemukan folder backups anda bisa membuatnya secara manual dengan memanfaatkan fitur create folder di bagian bawah. | ||
+ | - Masuk ke folder backups dan pindahkan file backup tar.gz tadi ke folder tersebut | ||
+ | - Klik HOME dan klik Create/ | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | <nspages -h1 -textPages=" |
Layanan
Harga Domain .COM | Harga Domain .ID | Shared Hosting | Email Hosting | MySQL Hosting |directadmin/cara-transfer-memindahkan-data-antar-akun.1522119510.txt.gz · Last modified: 2018/03/26 22:58 by kbadmin