A simple backup solution using docker and duplicati to perform remote encrypted incremental backups of a folder
curl
docker
Run curl https://gist.githubusercontent.com/morten-olsen/729008a69ed1f0f796d215ba8af7dc5a/raw/install.sh | bash
in the directory where you want to setup backup
This will install ./backup.sh
which is the file to start backups and restores on the specific folder, as well as /usr/bin/dbackups.sh
if not already installed, which is the man backup runner
To perform a backup run ./backup.sh backup
which if first run will ask you for the target. See https://duplicati.readthedocs.io/en/latest/05-storage-providers/ for compatible targets. Currently file://
targets are not supported, due to sandboxing.
To restore the latest backup run ./backup.sh restore
It creates a .backupdb
folder inside the backup location which stores backup state to facilitate managing state, and perform incremental backups.
Each run will ask for an encryption password if no "BACKUP_PASS" environmnent variable is set.
The easiest way to run periodic backups is to set the script up to run in cron
. Remeber that you will need the BACKUP_PASS
variable set, to run it non-interactive