ZxyBackupCloser is an easy backup application to store your ZFS pools containing a lot of snapshots to another ZFS pool or dataset.
Patineboot is backing up all Patineboot's ZFS pools on internal SSDs to an external SSD with ZxyBackupCloser every time.
You back up your ZFS pools with the one command, only ZxyBackupCloser.
- ZxyBackupCloser keeps all of the snapshots of your ZFS pools in the backup ZFS pools.
- ZxyBackupCloser supports the incremental backup from the previous backup.
- ZxyBackupCloser verifies the original and the backup ZFS pools with the portable mac.
- ZxyBackupCloser gets the difference between the previous and the present backup ZFS pools.
Official Release: https://pypi.org/project/zxybackupcloser/
Official Development Site: https://github.com/patineboot/zxybackupcloser
-
Install ZxyBackupCloser from PyPI.
Install
zxybackupcloser
with thepip3
command.pip3 install zxybackupcloser
-
'Pipe Viewer' and 'zfs-auto-snapshot'
Install 'Pipe Viewer' and 'zfs-auto-snapshot' with
apt
.apt install pv zfs-auto-snapshot
Get more information:
Back up your ZFS pools with zxybackupcloser
:
zxybackupcloser -b <backup pool> <original pools>
- <original pools>: specify the one or more names of the original ZFS pools.
- <backup pool>: specify the name of the destination pool or dataset to store the original pools.
e.g., Patineboot backs up two of the original pools named home.pool and storage.pool to the backup.pool pool.
sudo zxybackupcloser -b backup.pool home.pool storage.pool
Warn: Remove the com.sun:auto-snapshot property on the backup pool, or taking snapshots disturb the backup process.
Remove the com.sun:auto-snapshot property:
sudo zfs set com.sun:auto-snapshot=false <backup pool>
See more detail of usage, run the zxybackupcloser
command with the -h
option.
$ zxybackupcloser -h
usage: zxybackupcloser [-h] -b BACKUP [-d] [-v] [-n] [-u] pool [pool ...]
_ZxyBackupCloser_ is a backup application to back up some ZFS pools to another ZFS pool or dataset.
positional arguments:
pool specify one or more names of the original ZFS pools.
optional arguments:
-h, --help show this help message and exit
-b BACKUP, --backup BACKUP
specify the name of the pool or dataset to store the original pools.
-d, --diff get the difference of the backups from previous to present.
-v, --verbose run with verbose mode.
-n, --dry-run run with no changes made.
-u, --user run on your normal user account.
Patineboot has two helpful tools in the misc directory.
- zfs-load-enckey.service
Load the encryption key and mount filesystems automatically on the booting of your machine. - zxycloser_warapper.sh
Fulfill Patineboot's pools and verify the backup automatically.
-
Get ZxyBackupCloser from GitHub.com
Get ZxyBackupCloser with
git clone
:git clone https://github.com/patineboot/zxybackupcloser.git
-
Run the
backupcloser.py
scriptMove the current directory to the script directory by
cd zxybackupcloser/src/zxybackupcloser
and run thebackupcloser.py
script:cd ./zxybackupcloser/src/zxybackupcloser sudo ./backupcloser.py -h
Patineboot prepared the macros for deep configuration on the backupcloser.py script file. Change the macros for taking the snapshots and logging while backing up.
Notice: you can find the place of the backupcloser.py file with pip3 show zxybackupcloser
.
Patineboot is running ZxyBackupCloser with the following software environment. ZxyBackupCloser can run with other software or versions.
OS: Ubuntu Server 22.04
- Python 3.10.4
- ZFS on Linux 2.1.2
- pv 1.6.6
- zfs-auto-snapshot 1.2.4
Run ZxyBackupCloser while developing:
sudo PYTHONPATH=../ ./backupcloser.py -b <backup pool> <original pools>
Deploy ZxyBackupCloser on PyPI:
python3 -m build
python3 -m twine upload dist/*
twine asks:
User: patineboot
Pass: <your passphrase>
Update ZxyBackupCloser from PyPI.
Update zxybackupcloser
with the pip3
command.
pip3 install -U zxybackupcloser
Reference: Packaging Python Projects