Create Backup

Backup the docker volumes

All important data is stored in the Docker volumes.

VolumenameDescription

flyingfish_flyingfish

Data from backend with config and tmp files

flyingfish_flyingfishLetsencrypt

Data from backend with Lets Encrypt certificates

flyingfish_flyingfishDbData

Database files from Mariadb server

flyingfish_flyingfishInfluxdbData

Database files from Influxdb server

flyingfish_flyingfishSsh

Data from SSH jump server

Install the following shell script to create a backup of the volume.

sudo curl -SL https://raw.githubusercontent.com/stefanwerfling/docker-volume-snapshot/main/docker-volume-snapshot -o /usr/local/bin/docker-volume-snapshot
sudo chmod +x /usr/local/bin/docker-volume-snapshot

If you are interested or have questions, you can learn more about docker-volume-snapshot here.

Now everything is over to back up the volumes.

docker-volume-snapshot create <volume name> <backup file name>.tar

Restore the docker volumes

To restore the volume, first delete the old one (if it still exists).

docker volume rm <volume name>

Now it can be restored with the docker-volume-snapshot.

docker-volume-snapshot restore <backup file name>.tarh <volume name>

Last updated