-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace Gzip with optimized PGzip. Add concurrency option. * Add shortened timeout for 'dc down' too. * Add NaturalNumberZero to allow zero. * Add test for concurrency=0 * Rename to GZIP_PARALLELISM * Fix block size. Fix compression level. Fix CI. * Refactor compression writer fetching. Renamed WholeNumber
- Loading branch information
Showing
8 changed files
with
114 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cd $(dirname $0) | ||
. ../util.sh | ||
current_test=$(basename $(pwd)) | ||
|
||
docker network create test_network | ||
docker volume create app_data | ||
|
||
LOCAL_DIR=$(mktemp -d) | ||
|
||
docker run -d -q \ | ||
--name offen \ | ||
--network test_network \ | ||
-v app_data:/var/opt/offen/ \ | ||
offen/offen:latest | ||
|
||
sleep 5 | ||
|
||
docker run --rm -q \ | ||
--network test_network \ | ||
-v app_data:/backup/app_data \ | ||
-v $LOCAL_DIR:/archive \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
--env BACKUP_COMPRESSION=gz \ | ||
--env GZIP_PARALLELISM=0 \ | ||
--env BACKUP_FILENAME='test.{{ .Extension }}' \ | ||
--entrypoint backup \ | ||
offen/docker-volume-backup:${TEST_VERSION:-canary} | ||
|
||
tmp_dir=$(mktemp -d) | ||
tar -xvf "$LOCAL_DIR/test.tar.gz" -C $tmp_dir | ||
if [ ! -f "$tmp_dir/backup/app_data/offen.db" ]; then | ||
fail "Could not find expected file in untared archive." | ||
fi | ||
pass "Found relevant files in untared local backup." | ||
|
||
# This test does not stop containers during backup. This is happening on | ||
# purpose in order to cover this setup as well. | ||
expect_running_containers "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters