Automatically sync directories via FTP during off hours?

6,760

Solution 1

I set this up using

  • lsyncd (to do something each time the directory on the remote machine changed)
  • rsync (to transfer the files. as mentioned it only transfers the changed bits = efficient)
  • openssh (to allow password-less connection by using public and private keys)

This does fine if the remote machine is not behind a firewall. Mine was, so I set up a reverse tunnel

  • autossh (to maintain a persistent reverse tunnel)

This website was helpful: http://fak3r.com/2009/09/14/howto-build-your-own-open-source-dropbox-clone/

I had Cygwin on the local machine and Ubuntu on the remote one.

Happy to provide more detail if desired.

Solution 2

Edit Jan 27, 2015: While these other solutions were good at the time, this post is a little outdated. Now I would recommend using BitTorrent Sync. It will not let you specify the time to do the sync, but it will not upload anything except what is needed, so unless you are making major changes every day, it won't matter. You can limit the sending and receiving rates in the Advanced Preferences to keep your daytime internet speedy. If you absolutely need it to only run during off hours, you could use the windows Task Scheduler to start and stop it. If you are also absolutely tied to ftp, I would still recommend Cobian Backup.

Old post: Dropbox will not let you specify the time to do the upload. Neither will SugarSync, although SugarSync will at least let you select which directories to backup. Either of those are free for up to 2GB of data (plus an extra 250MB if you use the referral links provided here) and both are easy to use. If you are on Windows, you could try using NetDrive to map an ftp site as a network drive and then use your favorite backup program (mine is the $30 SecondCopy) to schedule a sync. Or, try the free Cobian Backup, which will sync directly with FTP servers.

Share:
6,760

Related videos on Youtube

jason
Author by

jason

Updated on September 17, 2022

Comments

  • jason
    jason almost 2 years

    I would like COMPUTER_A to sync anything found in a specific directory, with my FTP server, COMPUTER_B, but only during off hours. I would like it to automatically resume if the computer is rebooted.

    I use FileZilla now, but it will not automatically continue transferring when the computer is restarted. I also do not think that you can set the times for the transfers, with FileZilla.

  • Mr-Right
    Mr-Right over 14 years
    As you have described in your question, I suggest you 2nd one, it suites your requirements perfectly.