Using rsync to backup your Openfiler SAN

backuppcThe preferred protocol for backing up unix-based clients is rsync, as it allows BackupPC to act more intelligently with your data, creating a more efficient backup service.  This article describes the processs of configuring BackupPC to use rsync with Openfiler.


Prerequisites

Make sure that the rsync service is running on your Openfiler SAN.

  1. Logon to Openfiler.
  2. Go to Services > Managed Services.
  3. Enable the Rsync server.

 

You will also need a share that's accessible to your BackupPC server and your Openfiler SAN to be able to exchange ssh keys.

  1. Start by mounting an NFS share on both machines as /temp.

 

Create ssh keys

As root on the client machine

  1. ssh-keygen -t rsa
  2. Leave passphrase blank when requested.
  3. cp ~/.ssh/id_rsa.pub ~/.ssh/Client_id_rsa.pub
  4. chmod 777 ~/.ssh/Client_id_rsa.pub
  5. cp ~/.ssh/Client_id_rsa.pub /temp

 

As backuppc user on the BackupPC server

  1. sudu su - backuppc
  2. ssh-keygen -t rsa
  3. cp ~/.ssh/id_rsa.pub ~/.ssh/BackupPC_id_rsa.pub
  4. chmod 777 ~/.ssh/BackupPC_id_rsa.pub
  5. cp ~/.ssh/Backup_id_rsa.pub /temp

 

Exchange keys

As root on the client

Copy BackupPC_id_rsa.pub to the client machine's authorized_keys2 file.

  1. touch ~/.ssh/authorized_keys2
  2. cat BackupPC_id_rsa.pub >> ~/.ssh/authorized_keys2
  3. chmod -R go-rwx ~/.ssh

 

As backuppc on the BackupPC server

Copy Client_id_rsa.pub to the server's known_hosts file.

  1. touch ~/.ssh/known_hosts
  2. cat Client_id_rsa.pub >> ~/.ssh/known_hosts
  3. chmod -R go-rwx ~/.ssh

 

Testing your setup

As backuppc on the server

  1. ssh -l root client.yourdomain.local whoami

This should return...

root

 

You might be prompted for a password the first time you run the test, but you need to be able to run this command without being prompted, which should happen the second time onwards.

 

Thanks for visiting.