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 =/

Link to comment
Share on other sites

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
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.