Adding mount command, fixes #7

This commit is contained in:
Andrew Davidson 2021-07-19 14:45:50 -07:00
parent 3328c83133
commit 6266e3977a
Signed by: amd
GPG key ID: 17AF8F2A49CF25C6
2 changed files with 12 additions and 0 deletions

View file

@ -26,6 +26,8 @@ print_help () {
ex: backup.sh find s3 critical_file.doc
help - print this help
init - intiialize a new backup repository
mount - mount repository as a local file system
ex: backup.sh mount s3 /mnt/restic
prune - prune old backups on the destination
restore - restores file from repository (requires input)
ex: backup.sh restore s3 latest --target=/tmp/restore --include=/home/user/Documents
@ -143,6 +145,14 @@ else
--verbose \
init | print_and_log
;;
"mount")
echo "Mounting backup repository $DESTINATION at $INPUT" | print_and_log
/usr/bin/restic \
-r "$BACKUP_REPOSITORY" \
-p "$BACKUP_PASSWORD" \
--verbose \
mount "$INPUT" | print_and_log
;;
"restore")
echo "Restoring from $DESTINATION, $INPUT" | print_and_log
/usr/bin/restic \

View file

@ -25,6 +25,8 @@ print_help () {
ex: backup.sh find s3 critical_file.doc
help - print this help
init - intiialize a new backup repository
mount - mount repository as a local file system
ex: backup.sh mount s3 /mnt/restic
prune - prune old backups on the destination
restore - restores file from repository (requires input)
ex: backup.sh restore s3 latest --target=/tmp/restore --include=/home/user/Documents