1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-11-29 05:46:50 +02:00

Fix handling of empty directories (#44)

* Add test checking whether empty directories are included in backups

* Update targz library to include fix
This commit is contained in:
Frederik Ring
2021-12-29 10:10:12 +01:00
committed by GitHub
parent 32575c831e
commit 1f9582df51
3 changed files with 6 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ cd $(dirname $0)
docker network create test_network
docker volume create backup_data
docker volume create app_data
docker volume create empty_data
docker run -d \
--name minio \
@@ -31,6 +32,7 @@ sleep 10
docker run --rm \
--network test_network \
-v app_data:/backup/app_data \
-v empty_data:/backup/empty_data \
-v /var/run/docker.sock:/var/run/docker.sock \
--env AWS_ACCESS_KEY_ID=test \
--env AWS_SECRET_ACCESS_KEY=GMusLtUmILge2by+z890kQ \
@@ -44,7 +46,7 @@ docker run --rm \
docker run --rm -it \
-v backup_data:/data alpine \
ash -c 'tar -xvf /data/backup/test.tar.gz && test -f /backup/app_data/offen.db'
ash -c 'tar -xvf /data/backup/test.tar.gz && test -f /backup/app_data/offen.db && test -d /backup/empty_data'
echo "[TEST:PASS] Found relevant files in untared backup."