mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2024-11-21 16:01:03 +01:00
Added draft mysql dump
This commit is contained in:
parent
5cc5a6e5e5
commit
932595128c
@ -55,3 +55,4 @@ This setup script is not optimized yet for performance. Please optimized this sc
|
||||
## More information
|
||||
- https://blog.ssdnodes.com/blog/docker-backup-volumes/
|
||||
- https://www.baculasystems.com/blog/docker-backup-containers/
|
||||
- https://hub.docker.com/_/mariadb
|
||||
|
@ -37,6 +37,10 @@ do
|
||||
rsync -abP --delete --delete-excluded --log-file=$log_path --backup-dir=$raw_backup_dir_path '$source_path/' $raw_destination_path";
|
||||
done
|
||||
echo "start container: $container_name" && docker start "$container_name";
|
||||
if [ "mariadb" == "$(docker inspect --format='{{.Config.Image}}' $container_name)"]
|
||||
then
|
||||
docker exec some-mariadb sh -c 'exec mysqldump --all-databases -uroot -p"$MARIADB_ROOT_PASSWORD"' > /some/path/on/your/host/all-databases.sql
|
||||
fi
|
||||
done
|
||||
echo "end backup routine: $volume_name";
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user