Console backup application. Intended mainly for server administration.
- Configuration is YAML based
- Full logging capabilities with multiple handlers available
- Backup methods: tar and rsync
- Lock process so backup can execute after an existing backup finishes
- Auto-mount external device and open for encryption if encrypted
- Mysql and postgres dump
Download and extract:
wget https://github.com/Wtower/sysadmin-backup2/archive/v2.0.0-beta.tar.gz tar xvzf v2.0.0-beta.tar.gz cd sysadmin-backup2-2.0.0-beta
Install python packages. You can use virtualenv (recommended) or system-wide (example on Ubuntu):
sudo apt install python3-pip sudo -H pip3 install -U pip setuptools sudo -H pip3 install -U -r requirements.txt
Make sure to use python3:
(sysadmin-backup2) gkarak@neil ~/w/p/sysadmin-backup2 (dev)> ./sysadmin-backup.py -h usage: sysadmin-backup.py [-h] [-v] [--version] conf_file sysadmin-backup positional arguments: conf_file Configuration file optional arguments: -h, --help show this help message and exit -v Verbosity level --version show program's version number and exit
For the configuration parameters see conf/sample.conf.yml
.
Cron entries sample:
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' # m h dom mon dow command 0 5 * * * /root/sysadmin-backup2-2.0.0-beta/sysadmin-backup.py /etc/sysadmin-backup2/internal.conf.yml > /dev/null 5 10-14/1 * * 1-5 /root/sysadmin-backup2-2.0.0-beta/sysadmin-backup.py /etc/sysadmin-backup2/external.conf.yml > /dev/null
This is the Version 2 in Python 3. For Version 1.20 in C++ see sysadmin-backup v1.