You need to set following envs:
Volumes needed:
You should run the container with the command matching the backup profile name. If backup profile does not exist, return code 1 will be raised, unless env RC0_IF_NOT_ARGUMENT is set. In this case it will be 0.
Return code 2 is returned if requested profile did not exist.
You can set env RATE_LIMIT to a maximum speed of compression. Default is 100m, which means 100 MB/s.
You can set TAR_NICE to change niceness of tar and gzip processes. Default is 0.
A backup profile is a text file that uses simple commands to archive things.
backup X - archive a Docker volume called X, into X.tar.gz
start X - start a Docker container with given name
stop X - stop a Docker container with given name
archive X Y - archive an arbitrary directory on filesystem, expressed with a absolute path X, and save it as Y.tar.gz.
archive_tar X Y - works like archive, but will produce only a tar at output. You can follow it later with archive_gzip Y
Our daily backup is the PostgreSQL database plus system logs. We do it with a profile daily:
stop dms-postgres
backup dms-postgres
start dms-postgres
archive /var/log syslogs
They are executed via bash's source, so beware of code injections!
You can also alter RATE_LIMIT and TAR_NICE on a task basis.
stop dms-postgres
RATE_LIMIT=none backup dms-postgres
start dms-postgres
TAR_NICE=2 archive /var/log syslogs
none means that no limit will be imposed.
Content type
Image
Digest
Size
153.4 MB
Last updated
almost 9 years ago
docker pull smokserwis/docker-backup-util