From 3ceb815432c0b03e56a47df07e8f3204b659d0fd Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Wed, 19 Feb 2020 21:00:17 +0100 Subject: [PATCH] loose the stupid underscore --- README.md | 39 ++++++++++++++++++++++----------------- bin/zfs-autobackup | 1 + bin/zfs_autobackup | 2 +- setup.py | 2 +- 4 files changed, 25 insertions(+), 19 deletions(-) create mode 120000 bin/zfs-autobackup diff --git a/README.md b/README.md index 05913f7..12fc2e0 100644 --- a/README.md +++ b/README.md @@ -43,17 +43,22 @@ It has the following features: * Keeps latest X snapshots remote and locally. (default 30, configurable) * Uses zfs-holds on important snapshots so they cant be accidentally destroyed. * Easy installation: - * Just install zfs_autobackup via pip, or download it manually. + * Just install zfs-autobackup via pip, or download it manually. * Written in python and uses zfs-commands, no 3rd party dependency's or libraries. - * No separate config files or properties. Just one zfs_autobackup-command you can copy/paste in your backup script. + * No separate config files or properties. Just one zfs-autobackup command you can copy/paste in your backup script. ## Installation -Use pip or easy_install to install: +Use pip to install: ```console -[root@server ~]# pip install zfs_autobackup +[root@server ~]# pip install zfs-autobackup +``` +On older servers you might have to use easy_install + +```console +[root@server ~]# easy_install zfs-autobackup ``` Its also possible to just download and run it directly. @@ -61,8 +66,8 @@ Its also possible to just download ### internal error: Invalid argument @@ -346,9 +351,9 @@ This will update the zabbix server with the exitcode and will also alert you if ## Backuping up a proxmox cluster with HA replication -Due to the nature of proxmox we had to make a few enhancements to zfs_autobackup. This will probably also benefit other systems that use their own replication in combination with zfs_autobackup. +Due to the nature of proxmox we had to make a few enhancements to zfs-autobackup. This will probably also benefit other systems that use their own replication in combination with zfs-autobackup. -All data under rpool/data can be on multiple nodes of the cluster. The naming of those filesystem is unique over the whole cluster. Because of this we should backup rpool/data of all nodes to the same destination. This way we wont have duplicate backups of the filesystems that are replicated. Because of various options, you can even migrate hosts and zfs_autobackup will be fine. (and it will get the next backup from the new node automaticly) +All data under rpool/data can be on multiple nodes of the cluster. The naming of those filesystem is unique over the whole cluster. Because of this we should backup rpool/data of all nodes to the same destination. This way we wont have duplicate backups of the filesystems that are replicated. Because of various options, you can even migrate hosts and zfs-autobackup will be fine. (and it will get the next backup from the new node automaticly) In the example below we have 3 nodes, named h4, h5 and h6. @@ -381,12 +386,12 @@ 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 $@ + ./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 $@ + ./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/bin/zfs-autobackup b/bin/zfs-autobackup new file mode 120000 index 0000000..a3d0caf --- /dev/null +++ b/bin/zfs-autobackup @@ -0,0 +1 @@ +zfs_autobackup \ No newline at end of file diff --git a/bin/zfs_autobackup b/bin/zfs_autobackup index 7c72ac6..30c6ff1 100755 --- a/bin/zfs_autobackup +++ b/bin/zfs_autobackup @@ -27,7 +27,7 @@ try: except ImportError: use_color=False -VERSION="3.0-rc1" +VERSION="3.0-rc3" class Log: diff --git a/setup.py b/setup.py index c8d7c53..bc6b31e 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setuptools.setup( long_description_content_type="text/markdown", url="https://github.com/psy0rz/zfs_autobackup", - scripts=["bin/zfs_autobackup"], + scripts=["bin/zfs_autobackup", "bin/zfs-autobackup"], packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 2",