Koozali.org: home of the SME Server

Backup up 2 SME servers to each other

Offline jonroberts

  • ***
  • 111
  • +0/-0
    • http://www.westcountrybusiness.com
Backup up 2 SME servers to each other
« on: June 21, 2008, 11:47:42 AM »
I've got a client with 2 sites connected via VPN.  I intend to install an SME server on each site and would like each one to backup to the other overnight to provide off-site backup.  I may also then create local backup to USB for exta security.

I think I can do this wth Rsync but as I've not used this, I've been reading the forums and came across AFFA.  The information I found about AFFA seems to imply I need a single dedicated server to run this.  Can I run affa on both servers so each can operate as a production server during the day and then a remote backup server for the other overnight?

Or should I just stick to Rsync? 

Thanks
......

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Backup up 2 SME servers to each other
« Reply #1 on: June 21, 2008, 04:46:35 PM »
I strongly recommend Affa.

It simply uses rsync and manages the process so that you have control over how many backups to keep (daily, weekly, monthly, yearly)

Additionally, *If* you use a dedicated backup server, you can "rise" it to become any of the backed-up systems -- in your case this is less useful since "rising" server B would give you a running version of server A, but now you're still down one server (server B). 

Just because you're not planning to use the "rise" feature doesn't mean the other features aren't valuable.

So, in your case, you can think of Affa as:
- a simple way to setup public/private key encryption for ssh
- a secure way to do incremental rsync backups from one system to another
- a simple way to manage your backup policies

Note: if you tell Affa that the server at the other end is a SME server, then by default it only backs up the standard SME backup locations (taken from /usr/lib/perl5/site_perl/esmith/Backup.pm):     
        'home/e-smith',
        'etc/e-smith/templates-custom',
        'etc/e-smith/templates-user-custom',
        'etc/ssh',
        'root',
        'etc/sudoers',
        'etc/passwd',
        'etc/shadow',
        'etc/group',
        'etc/gshadow',
        'etc/samba/secrets.tdb',
        'etc/samba/smbpasswd',
        'etc/smbpasswd'

This list includes all locations where a virgin SME server stores data, but if you have installed any contribs that store data in /opt, or in any other non-standard locations, you'll need to set Affa's Include[0], Include[1], etc.  appropriately.
« Last Edit: June 21, 2008, 05:30:16 PM by mmccarn »

Offline jonroberts

  • ***
  • 111
  • +0/-0
    • http://www.westcountrybusiness.com
Re: Backup up 2 SME servers to each other
« Reply #2 on: June 22, 2008, 11:24:07 AM »
Thanks for the response.  That sounds what I'm after.  I'll download and give it a try.

I just wanted to check it was OK for a Production server to also act as a backup server before investing too much time. 

Out of interest, I assume the affa server can act as a backup to any Rsync client.  If so, then I guess it would also be possible for Windows PCs running DeltaCopy to backup to an SME server running Affa over a remote connection.  Is that right?

Sounds like that's opening a whole range of interesting possibilities ...  :P
......

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Backup up 2 SME servers to each other
« Reply #3 on: June 22, 2008, 01:30:47 PM »
mmccarn,
excellent explanation! Thanks. Was incentive enough to complete my wiki doc.

Offline m

  • ****
  • 276
  • +0/-0
  • Peet
Re: Backup up 2 SME servers to each other
« Reply #4 on: June 22, 2008, 01:40:07 PM »
If so, then I guess it would also be possible for Windows PCs running DeltaCopy to backup to an SME server running Affa over a remote connection.  Is that right?
Yes, but the rscnyd service must run on the windows computer. You can either using DeltaCopy or Cygwin as decribed here.
Keep in mind that the rsyncd protocol is _not_ encrypted, but this should not be a restriction as you are using a VPN tunnel.