Adding mount command, fixes #7
This commit is contained in:
parent
3328c83133
commit
6266e3977a
2 changed files with 12 additions and 0 deletions
10
backup.sh
10
backup.sh
|
@ -26,6 +26,8 @@ print_help () {
|
||||||
ex: backup.sh find s3 critical_file.doc
|
ex: backup.sh find s3 critical_file.doc
|
||||||
help - print this help
|
help - print this help
|
||||||
init - intiialize a new backup repository
|
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
|
prune - prune old backups on the destination
|
||||||
restore - restores file from repository (requires input)
|
restore - restores file from repository (requires input)
|
||||||
ex: backup.sh restore s3 latest --target=/tmp/restore --include=/home/user/Documents
|
ex: backup.sh restore s3 latest --target=/tmp/restore --include=/home/user/Documents
|
||||||
|
@ -143,6 +145,14 @@ else
|
||||||
--verbose \
|
--verbose \
|
||||||
init | print_and_log
|
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")
|
"restore")
|
||||||
echo "Restoring from $DESTINATION, $INPUT" | print_and_log
|
echo "Restoring from $DESTINATION, $INPUT" | print_and_log
|
||||||
/usr/bin/restic \
|
/usr/bin/restic \
|
||||||
|
|
|
@ -25,6 +25,8 @@ print_help () {
|
||||||
ex: backup.sh find s3 critical_file.doc
|
ex: backup.sh find s3 critical_file.doc
|
||||||
help - print this help
|
help - print this help
|
||||||
init - intiialize a new backup repository
|
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
|
prune - prune old backups on the destination
|
||||||
restore - restores file from repository (requires input)
|
restore - restores file from repository (requires input)
|
||||||
ex: backup.sh restore s3 latest --target=/tmp/restore --include=/home/user/Documents
|
ex: backup.sh restore s3 latest --target=/tmp/restore --include=/home/user/Documents
|
||||||
|
|
Loading…
Reference in a new issue