mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
install borg from backports in the future
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
d4645d50ab
commit
5c25656460
2 changed files with 16 additions and 2 deletions
|
|
@ -155,6 +155,13 @@ if [ "$BORG_MODE" = backup ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Compact archives
|
||||
echo "Compacting the archives..."
|
||||
if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
|
||||
echo "Failed to compact archives!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Back up additional directories of the host
|
||||
if [ "$ADDITIONAL_DIRECTORIES_BACKUP" = 'yes' ]; then
|
||||
if [ -d "/docker_volumes/" ]; then
|
||||
|
|
@ -172,11 +179,14 @@ if [ "$BORG_MODE" = backup ]; then
|
|||
echo "Backup of additional docker-volumes failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! borg prune --prefix '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
||||
echo "Failed to prune additional docker-volumes archives!"
|
||||
exit 1
|
||||
fi
|
||||
if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
|
||||
echo "Failed to compact archives!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ -d "/host_mounts/" ]; then
|
||||
EXCLUDED_DIRECTORIES=(home/*/.cache root/.cache var/cache lost+found run var/run dev tmp sys proc)
|
||||
|
|
@ -200,6 +210,10 @@ if [ "$BORG_MODE" = backup ]; then
|
|||
echo "Failed to prune additional host-mount archives!"
|
||||
exit 1
|
||||
fi
|
||||
if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
|
||||
echo "Failed to compact archives!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue