SUNScholar/Disaster Recovery/Backups/Client Setup/Server Sync
Contents
Step 2. Enable sync to remote server
Create an rsync config file
sudo nano /etc/rsyncd.conf
Copy and paste the following.
[backup] path = /var/backup [home] path = /home
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Enable the rsync server
sudo nano /etc/default/rsync
Change false to true.
RSYNC_ENABLE=true
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Start the rsync server
sudo /etc/init.d/rsync restart
Check the rysnc server
sudo rsync localhost::backup
A listing of files should be displayed. See example output below.
dspace@repository:~$ sudo ls -lh /var/backup total 984K -rw-r--r-- 1 root root 732 Dec 5 12:29 dspace-db.sql-Thu -rw-r--r-- 1 root root 956K Dec 5 12:29 etc.tgz.Thu -rw-r--r-- 1 root root 16K Dec 5 12:28 installed-software.Thu -rw-r--r-- 1 root root 3,5K Dec 5 12:29 root.tgz -rw-r--r-- 1 root root 1,4K Dec 5 12:29 usr-local.tgzsudo rsync localhost::home A listing of files should be displayed.Add a firewall rule to allow the backup server to get to the backup files using the "rsync" service
It is assumed that you have enabled a firewall on your IR server, if not please go to: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Firewall and do so. Then add the following firewall to allow the backup server to connect: sudo ufw allow from %server-hostname% to any port 873 Replace %server-hostname% with the server hostname of your backup server. Template:CONSOLE Back to Client Setup