@@ -54,13 +54,24 @@ Docker host, configure the Docker integration via µbackup config)
5454` $ docker run -e "BACKUP_COMMAND=..." ` for example) that contains the command used to take
5555a backup of the important state inside the container.
5656
57- If you need to backup a single file inside a container, use: ` BACKUP_COMMAND=cat /yourfile.db `
57+ For different use cases, for ` BACKUP_COMMAND ` specify:
5858
59- For PostgreSQL, you could use: ` BACKUP_COMMAND=pg_dump -U postgres nameOfYourDatabase `
59+ - If you need to backup a single file inside a container
60+ * Use: ` BACKUP_COMMAND=cat /yourfile.db `
6061
61- For a directory, you could use: ` BACKUP_COMMAND=tar -cC /yourdirectory -f - . ` (` - ` means
62- ` $ tar ` will write the archive to ` stdout ` , ` . ` just means to process all files in the
63- selected directory)
62+ - For databases etc. that support atomic dumping, e.g. PostgreSQL
63+ * Use: ` BACKUP_COMMAND=pg_dump -U postgres nameOfYourDatabase `
64+
65+ - For a directory
66+ * Use: ` BACKUP_COMMAND=tar -cC /yourdirectory -f - . `
67+ * ` - ` means ` $ tar ` will write the archive to ` stdout ` , ` . ` just means to process all files in the
68+ selected directory).
69+
70+ - If there's no tooling inside the container (think ` FROM scratch ` ), if you have a Docker
71+ volume you want to archive in its entirety
72+ * Use: ` BACKUP_COMMAND=dockervolume:// ` and µbackup will find the volume source data via
73+ Docker and use ` tar ` to dump the whole directory tree.
74+ * For this option, you have to run µbackup with ` $ docker run -v /var/lib/docker/volumes:/var/lib/docker/volumes `
6475
6576This simple approach is surprisingly flexible and its streaming approach is more efficient
6677than having to write temporary files.
0 commit comments