fix: Fixes not copying docker volumes directory to backups.
This commit is contained in:
@@ -49,7 +49,7 @@ function copyVolumes() {
|
|||||||
|
|
||||||
function backup() {
|
function backup() {
|
||||||
echo "Creating backup..."
|
echo "Creating backup..."
|
||||||
tar -cvf "/tmp/$today.tar" "$temp"
|
tar -cvf "/tmp/$today.tar" "$1"
|
||||||
gzip "/tmp/$today.tar"
|
gzip "/tmp/$today.tar"
|
||||||
cp -R "/tmp/$today.tar.gz" "$backupdir"
|
cp -R "/tmp/$today.tar.gz" "$backupdir"
|
||||||
# Cleanup temporary files.
|
# Cleanup temporary files.
|
||||||
@@ -67,8 +67,11 @@ function main() {
|
|||||||
# copy stack configuration.
|
# copy stack configuration.
|
||||||
copyStacks "$temp"
|
copyStacks "$temp"
|
||||||
|
|
||||||
|
# copy stack configuration.
|
||||||
|
copyVolumes "$temp"
|
||||||
|
|
||||||
# Create a tar to backup.
|
# Create a tar to backup.
|
||||||
backup
|
backup "$temp"
|
||||||
|
|
||||||
# Restart services.
|
# Restart services.
|
||||||
startServices
|
startServices
|
||||||
|
|||||||
Reference in New Issue
Block a user