bu-tools is a shell script easing the management of backup software such as Backup Manager. It offer a standardized method to manage the list of backed-up paths.
This howto is tested on:
- Debian 10.0 Buster
Requirements
This howto recommends:
This howto recommends one of these backup softwares:
- Backup Manager, as described by Install Backup Manager on Debian.
Installation
Detect if sudo is available (“command” is used if not):
cmdProxy='command'
command type -f 'sudo' &>'/dev/null' && cmdProxy='sudo'
Application’s installation
Install the tool:
${cmdProxy} wget 'https://raw.githubusercontent.com/biapy/howto.biapy.com/master/backup-tools/bu-tools' \
--quiet --no-check-certificate --output-document='/usr/local/bin/bu-tools'
Declare the downloaded file as executable:
${cmdProxy} chmod +x '/usr/local/bin/bu-tools'
Automatic updates
Configure biapy-updater automatic updates to check for new versions of the software:
${cmdProxy} tee -a '/etc/biapy-updater.conf' <<< 'bu-tools'
Usage
List the backup targets (a.k.a. backed-up paths):
sudo bu-tools --list
Add a path to backup targets:
sudo bu-tools --add='/path/to/data'
Remove a path from backup targets:
sudo bu-tools --remove='/path/to/data'
Clean-up backup targets (remove missing paths):
sudo bu-tools --cleanup
Get help on advanced usage of the tool :
command bu-tools --help
Thanks
- Thanks to George Khaznadar for his work on my script backup-manager-tools.
- Thanks to prince_jammys on irc.freenode.net#bash for pointing me to How can I handle command-line arguments to my script easily? (en) on Greg’s Wiki (en).
- Thanks to Andy Skelton (en) for Bash equivalent for PHP realpath() (en).
0 Comments