mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
Merge pull request #1305 from nextcloud/enh/279/update-borg
install borg from backports in the future
This commit is contained in:
commit
69122c55bf
2 changed files with 17 additions and 2 deletions
|
|
@ -2,9 +2,10 @@ FROM debian:bullseye-20221004-slim
|
|||
|
||||
RUN set -ex; \
|
||||
\
|
||||
echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends borgbackup -t bullseye-backports; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
borgbackup \
|
||||
rsync \
|
||||
fuse \
|
||||
python3-llfuse \
|
||||
|
|
|
|||
|
|
@ -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