Backup & restore
#!/bin/bash
# Script to export specific volume
docker run --rm -v $1:/data -v $(pwd):/dest ubuntu:20.04 tar cvzf /dest/$1.tar /data
#!/bin/bash
# Script to import specific volume
# Usage ./vimport volume-name volume-dump.tar
docker run --rm -v $1:/dest -v $(pwd):/source ubuntu:20.04 bash -c "cd /dest && tar xvf /source/$2 --strip 1"
echo "PASSWORD-HERE" > ~/.restic_pass
Command syntax here is:
restic -p
restic -p ~/.restic_pass -r rclone:backblaze:btnog10-demo init
restic -p ~/.restic_pass -r rclone:backblaze:btnog10-demo backup /home/a01/smokeping /home/a01/librenms
restic -p ~/.restic_pass -r rclone:backblaze:btnog10-demo snapshots
restic -p ~/.restic_pass -r rclone:backblaze:btnog10-demo restore latest --target /home/a01/restored-data