Jump to content

Proper way to move huge files between servers?


tibberous

Recommended Posts

There physically different servers.

 

The videos are tied into a web app - there are hundreds of them and they are attached to database records that are getting moved over at the same time. The way I have it setup, the videos are moved off the old server into a temporary directory, and a record is inserted into a database. After I move over several accounts, I run the video encoder, which reencodes and indexes all the videos. If I tried to do it by hand it would take weeks... even the mostly automated way I came up with is taking a long time -- each video takes about 15 minutes just to reencode =/

I think you need to create a bash script that will scp the file from one server to the other, then outputs something, like "1", or something. Then, you would do an if script like this:

<?php
$scp = shell_exec("move_file $file_name");
if ($scp == 1){
//run the sql transfer script
}
else{
//error out here
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.