--- title: backup.sh section: 1 header: General Commands Manual footer: Marco Cetica date: April 4, 2024 --- # NAME **backup.sh** - POSIX compliant, modular and lightweight backup utility to save and encrypt your files. # SYNOPSIS ``` Syntax: ./backup.sh [-b|-c|-e|-h] options: -b|--backup SOURCES DEST PASS Backup folders from SOURCES file. -c|--checksum Generate/check SHA256 of a backup. -e|--extract ARCHIVE PASS Extract ARCHIVE using PASS. -h|--help Show this helper. ``` # DESCRIPTION **backup.sh** is a POSIX compliant, modular and lightweight backup utility to save and encrypt your files. This tool is intended to be used on small scale UNIX environment such as VPS, small servers and workstations. **backup.sh** uses _rsync_, _tar_, _sha256sum_ and _gpg_ to copy, compress, verify and encrypt the backup. # OPTIONS **backup.sh** supports three options: **backup creation**, **backup extraction** and **checksum** to verify the integrity of a backup. The first option requires root permissions, while the second one does not. The checksum option must be used in combination of one of the previous options. ## Backup creation To specify the directories to back up, `backup.sh` uses an associative array defined in a text file(called _sources file_) with the following syntax: ```