add excludes to borg_backup.sh

This commit is contained in:
finga 2020-01-09 18:19:49 +01:00
parent c48fd57494
commit 0d33dc2ea4
1 changed files with 20 additions and 19 deletions

View File

@ -15,25 +15,26 @@ info "Starting backup"
# Backup the most important directories into an archive named after
# the machine this script is currently running on:
borg create \
--verbose \
--filter AME \
--list \
--stats \
--show-rc \
--compression lz4 \
--exclude-caches \
--exclude '/home/*/.cache/*' \
--exclude '/var/cache/*' \
--exclude '/var/tmp/*' \
--exclude '/share/media*' \
\
::'{hostname}-{now}' \
/etc \
/home \
/root \
/var \
/usr/local \
borg create \
--verbose \
--filter AME \
--list \
--stats \
--show-rc \
--compression lz4 \
--exclude-caches \
--exclude '/home/*/.cache/*' \
--exclude '/var/cache/*' \
--exclude '/var/tmp/*' \
--exclude '/share/media/*' \
--exclude '/var/lib/libvirt/images/*' \
\
::'{hostname}-{now}' \
/etc \
/home \
/root \
/var \
/usr/local \
backup_exit=$?