diff --git a/README.md b/README.md index 459e23a..d95ac3e 100644 --- a/README.md +++ b/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 +``` diff --git a/zfs_autobackup b/zfs_autobackup index fcdc8e3..ef2b103 100755 --- a/zfs_autobackup +++ b/zfs_autobackup @@ -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)))