revision
This commit is contained in:
104
README.md
104
README.md
@@ -1,52 +1,52 @@
|
|||||||
# duplicity
|
# duplicity
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
## ssh without password (using ssh-keygen)
|
## ssh without password (using ssh-keygen)
|
||||||
|
|
||||||
# Setup schedule
|
# Setup schedule
|
||||||
## create a symbolic link ln -s [source-path/duplicity-backup.sh] /etc/cron.daily/mybackup
|
## create a symbolic link ln -s [source-path/duplicity-backup.sh] /etc/cron.daily/mybackup
|
||||||
|
|
||||||
suffix=$(date +"%Y%m%d%H%M%S")
|
suffix=$(date +"%Y%m%d%H%M%S")
|
||||||
encryptKey=zzzzzzz
|
encryptKey=zzzzzzz
|
||||||
|
|
||||||
## home
|
## home
|
||||||
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 8 --force sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/home 2>&1 | tee /var/log/backup_home_${suffix}.log
|
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 8 --force sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/home 2>&1 | tee /var/log/backup_home_${suffix}.log
|
||||||
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /home\
|
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /home\
|
||||||
--exclude '**/cache'\
|
--exclude '**/cache'\
|
||||||
--exclude '**/.cache'\
|
--exclude '**/.cache'\
|
||||||
--exclude '**/tmp'\
|
--exclude '**/tmp'\
|
||||||
--exclude '**/.tmp'\
|
--exclude '**/.tmp'\
|
||||||
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/home\
|
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/home\
|
||||||
2>&1 | tee /var/log/backup_home_${suffix}.log
|
2>&1 | tee /var/log/backup_home_${suffix}.log
|
||||||
|
|
||||||
## etc
|
## etc
|
||||||
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 8 --force sftp://xxx@192.168.1.111://backups/devices/homeserver/duplicity/etc 2>&1 | tee /var/log/backup_etc_${suffix}.log
|
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 8 --force sftp://xxx@192.168.1.111://backups/devices/homeserver/duplicity/etc 2>&1 | tee /var/log/backup_etc_${suffix}.log
|
||||||
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /etc\
|
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /etc\
|
||||||
--exclude '**/cache'\
|
--exclude '**/cache'\
|
||||||
--exclude '**/.cache'\
|
--exclude '**/.cache'\
|
||||||
--exclude '**/tmp'\
|
--exclude '**/tmp'\
|
||||||
--exclude '**/.tmp'\
|
--exclude '**/.tmp'\
|
||||||
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/etc\
|
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/etc\
|
||||||
2>&1 | tee /var/log/backup_etc_${suffix}.log
|
2>&1 | tee /var/log/backup_etc_${suffix}.log
|
||||||
|
|
||||||
## root
|
## root
|
||||||
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 8 --force sftp://xxx@192.168.1.111://backups/devices/homeserver/duplicity/root 2>&1 | tee /var/log/backup_root_${suffix}.log
|
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 8 --force sftp://xxx@192.168.1.111://backups/devices/homeserver/duplicity/root 2>&1 | tee /var/log/backup_root_${suffix}.log
|
||||||
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /root\
|
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /root\
|
||||||
--exclude '**/cache'\
|
--exclude '**/cache'\
|
||||||
--exclude '**/.cache'\
|
--exclude '**/.cache'\
|
||||||
--exclude '**/tmp'\
|
--exclude '**/tmp'\
|
||||||
--exclude '**/.tmp'\
|
--exclude '**/.tmp'\
|
||||||
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/root\
|
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/root\
|
||||||
2>&1 | tee /var/log/backup_root_${suffix}.log
|
2>&1 | tee /var/log/backup_root_${suffix}.log
|
||||||
|
|
||||||
## data
|
## data
|
||||||
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 12 --force sftp://xxx@192.168.1.111://backups/devices/homeserver/duplicity/data 2>&1 | tee /var/log/backup_data_${suffix}.log
|
duplicity --encrypt-key ${encryptKey} remove-all-but-n-full 12 --force sftp://xxx@192.168.1.111://backups/devices/homeserver/duplicity/data 2>&1 | tee /var/log/backup_data_${suffix}.log
|
||||||
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /data\
|
duplicity --encrypt-key ${encryptKey} --verbosity info --full-if-older-than 7D /data\
|
||||||
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/data\
|
sftp://mfadmin@192.168.1.251://backups/devices/homeserver/duplicity/data\
|
||||||
2>&1 | tee /var/log/backup_data_${suffix}.log
|
2>&1 | tee /var/log/backup_data_${suffix}.log
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user