-
Notifications
You must be signed in to change notification settings - Fork 1
Remote backups
Due to its internals, the WABAC Machine only supports remote backups in a precise way. In fact, the WABAC Machine will run properly only if the destination is local. But, obvisously, and thanks to UNIX, a local destination can be a remote share mounted in the local filesystem tree.
Sadly, if you plan to use a rsync module or SSH, you can't use mount. But you may use another trick (not ideal, but still working) which consists in pulling the data (the server runs the WABAC Machine and connects to the client(s)) instead of pushing it (the client runs the WABAC Machine).
Protocol | Support |
---|---|
AFP | ✅ if mounted locally |
SMB | ✅ if mounted locally |
NFS | ✅ if mounted locally |
rsync module | ✅ if pulling data |
SSH | ✅ if pulling data |
There are basically 2 ways of getting this working. You can either:
- Create an entry in your
/etc/fstab
file, - Mount the share point on the fly (and unmount it when the backup is done).
The first method isn't covered by this documentation. You will easily find help about this subject on the Internet.
The second method makes use of preflight/postflight scripts. The idea is to mount the share via a preflight script, and to unmount it via a postflight script. The WABAC Tools provides some functions that might help you get done with this strategy.
It's pretty straightforward. You just have to put the SSH or rsync module connexion string as your source.
For a rsync module, it means that your source should match one of the following template :
[USER@]HOST::SRC
rsync://[USER@]HOST[:PORT]/SRC
For SSH, your source should match this template :
[USER@]HOST:SRC
For example, in your /etc/ssh/ssh_config
, you could specify :
Host client1
HostName client1.domain.com
Port 22000
User backup
IdentityFile ~/.ssh/backup-client1.key
Which would allow you to set your source (in your WABAC Machine configuration file) as such :
source=client1:/home
The manpages for rsync, ssh_config and ssh-keygen should help you here.
If you have a preflight script to mount a remote share, it's time to run it !
Once done, initialize the WABAC Machine :
sudo WABACMachine.sh init <source> <destination>
Please replace <source>
and <destination>
with the actual source and destination.
For example, if you want to backup your home directory (/home/john) to a remote NFS share mounted in /media/nfs-backups, you would type :
sudo WABACMachine.sh init /home/john/ /media/nfs-backups
If you want to backup the home directories from a distant host called client1
through SSH, you would type :
sudo WABACMachine.sh init client1:/home/ /backups
If everything runs fine, you should see something like this :
The WABAC Machine has been successfully initialized.
Run 'WABACMachine.sh backup' as root to create a new backup.
Run 'WABACMachine.sh help' to get some help.
The WABAC Machine has created a default configuration file called WABACMachine.conf
in your current working directory. You can edit it to suit your needs.
The WABAC Machine has also created a file called .wabac_machine_is_present
in <destination>
. This will make sure we use this destination and not something such as an empty mount point.
You should now edit your configuration file and fill the preflight
and postflight
preferences if you have to.
And that's it ! You are ready to go !
If you are not really confident, you can set the WABAC Machine to conduct a dry run.
Once everything is OK and checked, you will probably want to automate the backup process.
WABAC Machine | Copyright © 2009-2016 François Kubler (@fkubler)