Author Topic: Server Backup via Rsync  (Read 1647 times)

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Server Backup via Rsync
« on: June 11, 2011, 09:59:43 PM »
So i want to backup my entire server disk from my dedicated remote server (centos) to my laptop (ubuntu 10). I figure since i have SSH access I can just dump it via rsync, but i'm not sure how across a remote connection. Google is leading me in very confusing circles. Any ideas? Or a better way?
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

Dumah

  • Jackass IV
  • Posts: 960
  • Karma: +21/-6
Re: Server Backup via Rsync
« Reply #1 on: June 12, 2011, 04:06:42 AM »
If its a remote service shouldnt they be backing up the disk? All I do is backup the data (files and database) and have a copy of the settings. If the disk fails they will not let you restore it by yourself anyway.

For a simple way on ubuntu, do some research on 'lftp' - its a command line ftp client that reads instructions from a text script. Write the script and run it as a cron job on your laptop to do the sync. The script you write can login via SFTP (uses ssh - no need for the server to run a dedicated FTP daemon) mirror the files you want and exit in about 3 lines of script. The cool thing abut this way is that you already have the software on the server (ssh) to do it (unless you are using telnet or something daft like that!).

It will be difficult to run this from the server end as your laptop might not be connected when the server wants to backup. Easier to PULL data on these occasions than PUSH it

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Server Backup via Rsync
« Reply #2 on: June 12, 2011, 09:48:49 AM »
Yea I definitly want to pull it. Thnx for the idea!

And ya they do but I never trust others to backup
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?

Mike

  • Jackass In Charge
  • Posts: 11256
  • Karma: +168/-32
  • Ex Asshole - a better and more caring person.
Re: Server Backup via Rsync
« Reply #3 on: June 12, 2011, 10:24:55 AM »
So i want to backup my entire server disk from my dedicated remote server (centos) to my laptop (ubuntu 10). I figure since i have SSH access I can just dump it via rsync, but i'm not sure how across a remote connection. Google is leading me in very confusing circles. Any ideas? Or a better way?

rsync <USER>@<HOST>:<REMOTE DIR> <LOCALDIR>

ex: rsync backup@server:/var/www /var/www

Steve

  • This 49%er supports Romney
  • Just a Jackass
  • *
  • Posts: 16120
  • Karma: +31/-410
  • Mr. Mom
Re: Server Backup via Rsync
« Reply #4 on: June 12, 2011, 12:49:38 PM »
Perfect. Thanks mike! Going to look into the mother method still, but this is exactly what I need. I like that after the first update it is only the changes that download.
hey ethic if you and i were both courting lily allen..... oh wait, which one of us has a relationship that lasted more than the bus ride home?