2016-08-29 11:54:43 -04:00
|
|
|
REPO="aw:backup/backup.borg"
|
|
|
|
b-list() {
|
|
|
|
if [[ -z "$1" ]]; then
|
2016-09-02 00:27:36 -04:00
|
|
|
column -t <(borg list "$REPO")
|
2016-08-29 11:54:43 -04:00
|
|
|
else
|
|
|
|
borg list "$REPO"::"$1"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
b-delete() {
|
|
|
|
if [[ ! -z "$1" ]]; then
|
|
|
|
borg delete "$REPO"::"$1"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
b-create() {
|
2016-09-09 12:01:04 -04:00
|
|
|
local SUDO=""
|
|
|
|
if command -v sudo > /dev/null; then
|
|
|
|
SUDO="$(command -v sudo)"
|
2016-08-29 11:54:43 -04:00
|
|
|
fi
|
2016-09-09 12:01:04 -04:00
|
|
|
$SUDO /home/stonewareslord/syncthing/me/backup/$(hostname)/backup
|
2016-08-29 11:54:43 -04:00
|
|
|
}
|
2016-09-02 00:27:36 -04:00
|
|
|
b-rename() {
|
|
|
|
borg rename -v "$REPO"::"$1" "$2"
|
|
|
|
}
|
|
|
|
b-cmd() {
|
|
|
|
echo "$REPO"
|
|
|
|
}
|