mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-11 22:40:01 +03:00
disable destroy-stale for now. updated readme
This commit is contained in:
parent
617e0fb69b
commit
80b3272f0f
16
README.md
16
README.md
@ -283,3 +283,19 @@ Preparing the backup server
|
||||
Extra options needed for proxmox with HA:
|
||||
* --no-holds: To allow proxmox to destroy our snapshots if a VM migrates to another node.
|
||||
* --ignore-replicated: To ignore the replicated filesystems of proxmox on the receiving nodes. (only backup from the node where the VM is active)
|
||||
|
||||
|
||||
I use the following backup script on the backup server:
|
||||
```
|
||||
for H in h4 h5 h6; do
|
||||
echo "################################### DATA $H"
|
||||
#backup data filesystems to a common place
|
||||
./zfs_autobackup --ssh-source root@$H data_smartos03 zones/backup/zfsbackups/pxe1_data --clear-refreservation --clear-mountpoint --ignore-transfer-errors --strip-path 2 --verbose --resume --ignore-replicated --no-holds $@
|
||||
zabbix-job-status backup_$H""_data_smartos03 daily $? >/dev/null 2>/dev/null
|
||||
|
||||
echo "################################### RPOOL $H"
|
||||
#backup rpool to own place
|
||||
./zfs_autobackup --ssh-source root@$H $H""_smartos03 zones/backup/zfsbackups/$H --verbose --clear-refreservation --clear-mountpoint --resume --ignore-transfer-errors $@
|
||||
zabbix-job-status backup_$H""_smartos03 daily $? >/dev/null 2>/dev/null
|
||||
done
|
||||
```
|
||||
|
@ -719,10 +719,10 @@ def zfs_autobackup():
|
||||
stale_target_destroys.append(stale_target_filesystem)
|
||||
|
||||
if stale_target_destroys:
|
||||
if args.destroy_stale:
|
||||
verbose("Destroying stale filesystems on target {0}:\n{1}".format(args.ssh_target, "\n".join(stale_target_destroys)))
|
||||
zfs_destroy(ssh_to=args.ssh_target, filesystems=stale_target_destroys, recursive=True)
|
||||
else:
|
||||
# if args.destroy_stale:
|
||||
# verbose("Destroying stale filesystems on target {0}:\n{1}".format(args.ssh_target, "\n".join(stale_target_destroys)))
|
||||
# zfs_destroy(ssh_to=args.ssh_target, filesystems=stale_target_destroys, recursive=True)
|
||||
# else:
|
||||
verbose("Stale filesystems on {0}:\n{1}".format(args.ssh_target, "\n".join(stale_target_destroys)))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user