Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have around 100GB of data which i want to backup on remote FTP.

Now i think it will take around 2-3 week to upload as i have upload speed around 100KB/s.

Now i can't do that continuously.

Is it possible that rync strtuploading from 8PM to 6AM so that it uploads after work hours

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yes you can do this with rsync, you can also enable compression with rsync to get more out of your pipe at the cost of CPU Load, these are the options for compression from the man page:

-z, --compress              compress file data during the transfer
    --compress-level=NUM    explicitly set compression level
    --skip-compress=LIST    skip compressing files with suffix in LIST

So, you can set it up to compress .html files, while not compressing .jpg's ( since they are already compressed and this will just eat cycles )

As for the time period you're specifying, just run rsync from cron starting at 8pm, something like:

0 20 * * *  rsync -av --compress --skip-compress=jpg,mp3,mpeg /source /dest

Then run kill from cron at 6am - if this is the only rsync process running on this server - something like this:

0 6 * * * killall rsync

Please note these are just examples of how you can do this, they don't include any sanity checks of any sort. They should work in a basic environment as long as nothing else interferes, but I would not consider it a robust solution...

share|improve this answer
    
I use -avz option is that good –  John May 4 '10 at 7:50
    
Yeah, that's a pretty common set of options, and it should work fine for what you're attempting to do here. If the CPU load starts to be a problem you should also use the --skip-compress option to exclude compression on any binary or already compressed files which may be getting backed up. Like MySQL DBs, pics, and movies. –  Ali Chehab May 4 '10 at 8:58
1  
according to the rsync man page, the value for --skip-compress should be a list of extensions separated by slashes, i.e. --skip-compress=jpg/mp3/mpeg. –  daniel kullmann Jan 25 '13 at 14:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.