blob: c49ad15ad3946f2509d49671a0b1791edebbabd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/bash
set -e
if ! which docker > /dev/null; then
echo docker not found.
exit 1
fi
if ! docker images | grep debian | grep stable > /dev/null; then
echo debian:stable not found. Please extract backup with custom image.
exit 2
fi
if test -z $1; then
echo Please, give the backup file\'s path as the one argument.
exit 1
fi
if ! test -a $1; then
echo File $1 not found.
exit 1
fi
docker run \
-v $1:/tmp/backup.tar \
-v hybrid_talerdata:/taler-data \
-v hybrid_talerlogs:/taler-logs \
-it debian:stable /bin/bash -c "tar -x -f /tmp/backup.tar"
|