dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit e447abb6ecf21f173a1cd6665048cf09c06b9050
parent 268b688e3eb2fa8a1bde933272f9ddedbd3b36d5
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 26 Apr 2019 19:24:58 +0200

Add status command, update nnn

Diffstat:
Mbin/backup-b2 | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/bin/backup-b2 b/bin/backup-b2 @@ -22,6 +22,7 @@ function show_help { echo " backup Backup /home, /etc, and /user, and clean out" echo " old backups and failures" echo " list List all files in latest backup set" + echo " status Show status of all backups" echo " restore SRC DST Restore SRC file or dir from backup to local" echo " DST. The SRC must be the path listed as the" echo " last column from the 'list' command" @@ -73,6 +74,19 @@ function duplicity_backup_b2 { b2://"$b2_account":"$b2_key"@"$b2_dir" } +function status_b2 { + printf "\n## %s\n" "$1" + duplicity $opts \ + collection-status \ + b2://"$b2_account":"$b2_key"@"$1" +} + +function list_status_b2 { + status_b2 "$(hostname)-new-home" + status_b2 "$(hostname)-new-etc" + status_b2 "$(hostname)-new-usr" +} + function backup_b2 { duplicity_backup_b2 /home "$(hostname)-new-home" duplicity_backup_b2 /etc "$(hostname)-new-etc" @@ -135,6 +149,9 @@ for command in "$@"; do backup) backup_b2 ;; + status) + list_status_b2 + ;; list) list_backups_b2 ;;