1

I am on a free hosting service which offers me cpanel.I want to have dropbox like syncing of my files on their server and my local hard disk, this way it serves as a backup and i do not have top upload everything i change. Is it possible to have real time "block level"(only changed chunks) sync exactly like dropbox?

myax
  • 9
  • 1
  • 2
  • 1
    Does your host support webdav? You can do something similar although not as sophisticated as dropbox. I hope someone has an answer because I'd be interested in doing something like this too. Right now I just use a webdav folder. – egorgry Jun 25 '10 at 19:29
  • i dont think so, all i get is a cpanel 11 vps optimized, i cant see webdav in there. I do have webdisk though. does it do the same thing? – myax Jun 25 '10 at 19:33
  • does the webdisk do real time and block level sync? – myax Jun 25 '10 at 19:35
  • looks like webdisk is webdav. Webdav is simply like a share on your host. It won't sync anything locally which is part of the dropbox magic. There may be some projects that mimic dropbox behavior on sourceforge. http://sourceforge.net/ webdisk tutorial http://www.cpanel.net/media/tutorials/webdisk.htm – egorgry Jun 25 '10 at 19:48

1 Answers1

1

I'm not aware of a real-time option that would be available with the access level of a normal cPanel user, but you could setup a regularly updated local copy using rsync if your host allows SSH access (some don't but many do) and has rsync installed (most do as many hosts use it as part of the backup routines).

Ensure that the ssh client and rsync are installed (they a are likely to already be if you are running Linux, and you can install them under Windows using cwrsync or cygwin), arrange for the ssh client to connect to your account using key-based authentication, then setup a cron-job or scheduled task on your local machine that runs something like rsync -a --compress username@cpanel.host:~/ ~/cpanelbackup/ regularly, say once per day or per hour.

rsync is pretty good at transferring the minimum required to keep a copy of the data synchronised.

If you have databases in your cPanel account you will need to do some extra work as they are usually not contained in your home directory (and if they are, they can't be safely backed-up "hot" anyway). To get these you would need to set a cron-job on the server to backup the database(s) into your home directory regularly, ready for the rsync process to grab them. Don't compress such backups as this will make the rsync process much less efficient (or if you do compress them, use a compressor that has "rsync friendly" options). Be careful not to backup the databases too often - backing up a large database can be quite I/O intensive and a shared host will take a dim view of one using imposing an "unfair" amount of I/O load on a server.

This would be a one-way solution unfortunately.

David Spillett
  • 22,754
  • 45
  • 67