david/sshbackup
david
/
sshbackup
Archived
1
0
Fork 0

updated README for v0.3

This commit is contained in:
david 2013-04-27 22:43:01 +02:00
parent c6d3a432f4
commit dcacf55c48
1 changed files with 54 additions and 10 deletions

View File

@ -7,7 +7,51 @@ you must add following to /etc/sudoers on your remote servers as well to
make automated backups work
```backupuser ALL=(root)NOPASSWD: /usr/bin/rsync```
a example config for default values in ~/.sshbackup looks like this:
scheduling
----------
using cron will help you with that. example /etc/crontab:
```
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO="admin@example.com"
# m h dom mon dow user command
0 2 * * * root sshbackup /path/to/source /path/to/destination 5
0 3 * * * root sshbackup -s /path/to/sshkey -l /path/to/listfile
0 4 * * * root sshbackup bkpuser@server:/path/to/source /path/to/destination 30
```
notifications
-------------
utilize crons MAILTO directive for getting error notifications.
```MAILTO=admin@example.com```
automation
----------
for automated backups configure a sshkey for the root user and
configure your remote machines to trust that key.
```
sudo su
ssh-keygen
ssh-copy-id <remote machine>
```
you can use a file which should have a source/destination combination each line.
example listfile:
```
#<source> <destination> [<versions>]
david@dev.socialnerds.org:/home/david /home/david/Downloads/devhome 30
backupuser@dev.socialnerds.org:/home/gollum/ /home/david/Downloads/gollum
/home/david/something /home/david/backup 5
```
~/.sshbackup
------------
a example config for default values looks like this [optional]:
```
#rsync options.
rsyncoptions="-pogEthrzl --numeric-ids --no-motd"
@ -17,12 +61,12 @@ localcmd="/usr/bin/rsync"
sshkeyfile="$HOME/.ssh/id_rsa"
```
if you are running sshbackup through cron configure the MAILTO
directive for getting error notifications.
a list file could look like this
```
david@dev.socialnerds.org:/home/david /home/david/Downloads/devhome 30
backupuser@dev.socialnerds.org:/home/gollum/ /home/david/Downloads/gollum
/home/david/something /home/david/backup 5
```
future features
---------------
- [x] notification on errors (with cron for now)
- [ ] useful logging
- [ ] remote settings deployment
- [ ] bandwidth limits
- [ ] sshkey creation/management
- [ ] some kind of optional reports/stats
- [ ] install missing dependencies