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
|
|
@ -3,8 +3,8 @@ FROM debian:bullseye-20221004-slim
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
apt-get update; \
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends borgbackup -t bullseye-backports; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
borgbackup \
|
|
||||||
rsync \
|
rsync \
|
||||||
fuse \
|
fuse \
|
||||||
python3-llfuse \
|
python3-llfuse \
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,13 @@ if [ "$BORG_MODE" = backup ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# Back up additional directories of the host
|
||||||
if [ "$ADDITIONAL_DIRECTORIES_BACKUP" = 'yes' ]; then
|
if [ "$ADDITIONAL_DIRECTORIES_BACKUP" = 'yes' ]; then
|
||||||
if [ -d "/docker_volumes/" ]; then
|
if [ -d "/docker_volumes/" ]; then
|
||||||
|
|
@ -172,11 +179,14 @@ if [ "$BORG_MODE" = backup ]; then
|
||||||
echo "Backup of additional docker-volumes failed!"
|
echo "Backup of additional docker-volumes failed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! borg prune --prefix '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
if ! borg prune --prefix '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
|
||||||
echo "Failed to prune additional docker-volumes archives!"
|
echo "Failed to prune additional docker-volumes archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
|
||||||
|
echo "Failed to compact archives!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -d "/host_mounts/" ]; then
|
if [ -d "/host_mounts/" ]; then
|
||||||
EXCLUDED_DIRECTORIES=(home/*/.cache root/.cache var/cache lost+found run var/run dev tmp sys proc)
|
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!"
|
echo "Failed to prune additional host-mount archives!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
|
||||||
|
echo "Failed to compact archives!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue