Back up your data
Ferry makes no backup for you. Three places hold your data, and each has its own method.
Keep the backups off the server, and encrypt them
The data directory and the dumps contain each secret of your apps.
1. The data directory
/var/lib/ferry is the data directory. It holds the state of Ferry: services, settings, variables, deploy history, datastore passwords, certificates and logs.
sqlite3 /var/lib/ferry/ferry.db ".backup /backup/ferry.db"This command copies ferry.db, the SQLite database, safely while ferryd runs. Then copy the rest of the directory: api_token, instance_id and certs/.
As an alternative, stop ferryd and copy the full directory.
2. The datastores
Their data is in the Docker volumes <prefix>-ds-<name>-data. For Postgres, use pg_dump: see Datastores. Redis saves its data to its volume. If you need this data, copy the volume.
3. The disks
The data of each disk is in a Docker volume <prefix>-svc-<service id>-disk. Copy the volume with a temporary container, for example:
docker run --rm -v ferry-svc-srv-…-disk:/data:ro -v "$PWD":/backup alpine tar czf /backup/disk.tgz -C /data .