Change backup directory to external USB

This commit is contained in:
Wojciech Kozlowski 2019-12-14 13:30:04 +01:00
parent bdb0412836
commit 2e9f03aec1

View File

@ -88,7 +88,7 @@ function backup {
set -o xtrace set -o xtrace
docker run --rm \ docker run --rm \
-v loki_${vol}:/opt/${vol} \ -v loki_${vol}:/opt/${vol} \
-v /srv/backup:/opt/backup \ -v /media/usb0:/opt/backup \
debian:stable-slim \ debian:stable-slim \
bash -c "cd /opt/${vol} && tar cf /opt/backup/${vol}.tar ." bash -c "cd /opt/${vol} && tar cf /opt/backup/${vol}.tar ."
set +o xtrace set +o xtrace
@ -111,7 +111,7 @@ function restore {
set -o xtrace set -o xtrace
docker run --rm \ docker run --rm \
-v loki_${vol}:/opt/${vol} \ -v loki_${vol}:/opt/${vol} \
-v /srv/backup:/opt/backup \ -v /media/usb0:/opt/backup \
debian:stable-slim \ debian:stable-slim \
bash -c "cd /opt/${vol} && tar xf /opt/backup/${vol}.tar" bash -c "cd /opt/${vol} && tar xf /opt/backup/${vol}.tar"
set +o xtrace set +o xtrace