Small improvements
This commit is contained in:
parent
b9b0cae0d2
commit
fa275b8b74
3 changed files with 17 additions and 8 deletions
|
|
@ -18,7 +18,9 @@ if [ $? -ne 0 ]; then
|
|||
borg init --encryption=repokey
|
||||
fi
|
||||
|
||||
# the above command will fail if the repo hasn't been already initialized, so we can ignore the return status
|
||||
# The above command will fail if the repo hasn't been already initialized,
|
||||
# so we can ignore the return status. However, if any of the commands below fail,
|
||||
# we want to stop the script immediately.
|
||||
set -e
|
||||
|
||||
if [ -d "/snapshot/source" ]; then
|
||||
|
|
@ -28,7 +30,12 @@ fi
|
|||
btrfs subvolume snapshot /source /snapshot
|
||||
|
||||
cd /snapshot/source
|
||||
borg create --stats --list --filter=AMCE --files-cache=ctime,size --compression=zstd,12 --exclude-from /exclude.conf ::"{hostname}-{now:%Y-%m-%dT%H:%M:%S}" .
|
||||
borg create --stats \
|
||||
--list \
|
||||
--filter=AMCE \
|
||||
--files-cache=ctime,size,inode \
|
||||
--compression=zstd,12 \
|
||||
--exclude-from /exclude.conf ::"{hostname}-{now:%Y-%m-%dT%H:%M:%S}" .
|
||||
cd -
|
||||
|
||||
borg prune --list --stats \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue