{"id":19635872,"url":"https://github.com/tozd/docker-rdiff-backup","last_synced_at":"2026-01-04T11:08:12.757Z","repository":{"id":82333824,"uuid":"91629342","full_name":"tozd/docker-rdiff-backup","owner":"tozd","description":"Docker image providing backups with rdiff-backup. Read-only mirror of https://gitlab.com/tozd/docker/rdiff-backup","archived":false,"fork":false,"pushed_at":"2024-05-15T21:50:09.000Z","size":19,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-24T06:02:00.982Z","etag":null,"topics":["backup","docker","docker-image","rdiff-backup"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tozd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["plast8","mitar"]}},"created_at":"2017-05-17T23:40:04.000Z","updated_at":"2024-11-11T01:26:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"8071dc5d-72a3-4964-bf06-2d861f4d229b","html_url":"https://github.com/tozd/docker-rdiff-backup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-rdiff-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-rdiff-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-rdiff-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-rdiff-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tozd","download_url":"https://codeload.github.com/tozd/docker-rdiff-backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244091253,"owners_count":20396583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","docker","docker-image","rdiff-backup"],"created_at":"2024-11-11T12:27:21.813Z","updated_at":"2026-01-04T11:08:12.751Z","avatar_url":"https://github.com/tozd.png","language":"Shell","funding_links":["https://github.com/sponsors/plast8","https://github.com/sponsors/mitar"],"categories":[],"sub_categories":[],"readme":"# tozd/rdiff-backup\n\n\u003chttps://gitlab.com/tozd/docker/rdiff-backup\u003e\n\nAvailable as:\n\n- [`tozd/rdiff-backup`](https://hub.docker.com/r/tozd/rdiff-backup)\n- [`registry.gitlab.com/tozd/docker/rdiff-backup`](https://gitlab.com/tozd/docker/rdiff-backup/container_registry)\n\n## Image inheritance\n\n[`tozd/base`](https://gitlab.com/tozd/docker/base) ← [`tozd/dinit`](https://gitlab.com/tozd/docker/dinit) ← [`tozd/mailer`](https://gitlab.com/tozd/docker/mailer) ← [`tozd/cron`](https://gitlab.com/tozd/docker/cron) ← `tozd/rdiff-backup`\n\n## Tags\n\n- `latest`: rdiff-backup 2.2.6\n\n## Volumes\n\n- `/source/host`: Mount of the host's `/` directory to backup (but it can also be some other directory).\n- `/source/data`: Before every backup, additional data is collected and stored here and then it is backed up together with the rest of files.\n- `/backup`: Destination to where the backup is made.\n- `/etc/backup.d`: Optional scripts which collect additional data to be backed up and store them into `/source/data` (e.g., database dumps).\n\n## Variables\n\n- `RDIFF_BACKUP_EXPIRE`: How long to keep past versions, provided as a string according to\n  _time formats_ section of [rdiff-backup man page](http://www.nongnu.org/rdiff-backup/rdiff-backup.1.html).\n  Default is 12M for 12 months.\n\n## Description\n\nDocker image providing daily backups with [rdiff-backup](http://www.nongnu.org/rdiff-backup/).\nThe main purpose is to backup host with all data volumes stored outside containers, with\noptionally database dumps and other custom data, but it can also be used to backup\njust a particular directory. Using rdiff-backup gives you direct access to the latest version\nwith past versions possible to be reconstructed using rdiff-backup. Past changes are stored\nusing reverse increments.\n\nFor remote backup instead of local host backup, consider\n[tozd/rdiff-backup-remote Docker image](https://gitlab.com/tozd/docker/rdiff-backup-remote).\n\nYou have to mount `/var/run/docker.sock` from host into `/var/run/docker.sock` for this image\nto work as the image uses Docker client to obtain information about location of\nDocker directories (to exclude them from backup).\n\nMount a directory (often host's `/`) you want to backup to `/source/host` volume.\nAnd mount a directory to where you want to store the backup to `/backup`. That directory\nwill be ignored during backup automatically (to not backup the backup).\n\nIf you want to configure only parts of `/source/host` volume to be backed up, you can provide\na `/source/backup.list` file which is passed as `include-globbing-filelist` to rdiff-backup.\nExample:\n\n```\n+ /source/host/etc\n+ /source/host/home\n+ /source/host/root\n+ /source/host/var/backups\n+ /source/host/var/log\n+ /source/host/usr/local/bin\n+ /source/host/usr/local/etc\n+ /source/host/usr/local/sbin\n- /source/host\n```\n\nThis file configures that `/etc`, `/home`, `/root` and parts of `/var` are backed up, while the\nrest of the `/source/host` (and host's files) is ignored.\nNotice the prefix `/source/host` you have to use for all paths.\n\nYou can provide this file by mounting it into the container.\nConsult section _file selection_ of [rdiff-backup man page](http://www.nongnu.org/rdiff-backup/rdiff-backup.1.html)\nfor more information on the format of this file.\n\nEvery time backup runs it can also collect additional data to backup and stores it under\n`/source/data` in the container, so that it is backed up together with the rest (whole `/source`\ndirectory is backed up). By default, a list of all files which exist on host (as mounted to `/source/host`) is made\nand stored under `/source/data/allfiles.list`, but you can also add custom scripts to this step\nby adding them to `/etc/backup.d` directory in the container (probably by mounting a directory to `/etc/backup.d`\nvolume and then adding the scripts to that directory).\nFor example, you can dump databases running inside other Docker containers.\n\nFor [tozd/postgresql](https://gitlab.com/tozd/docker/postgresql) image, you can create a script `/etc/backup.d/pgsql` like:\n\n```bash\n#!/bin/bash -e\ndocker exec pgsql pg_dumpall -U postgres \u003e /source/data/pgsql.sql\n```\n\nAnd for [tozd/mysql](https://gitlab.com/tozd/docker/mysql) image, you can create `/etc/backup.d/mysql`:\n\n```bash\n#!/bin/bash -e\nPASSWORD=$(docker exec mysql grep password /etc/mysql/debian.cnf | awk '{print $3}' | head -1)\necho \"$PASSWORD\" | docker exec mysql mysqldump --user=debian-sys-maint --password=\"$PASSWORD\" --all-databases \u003e /source/data/mysql.sql\n```\n\nTo get e-mails with any errors during daily backups, you have also to\nconfigure `MAILTO`, `ADMINADDR`, and `REMOTES` environment variables\nas described in [`tozd/mailer`](https://gitlab.com/tozd/docker/mailer)\nand [`tozd/cron`](https://gitlab.com/tozd/docker/cron) Docker images.\n\n## GitHub mirror\n\nThere is also a [read-only GitHub mirror available](https://github.com/tozd/docker-rdiff-backup),\nif you need to fork the project there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftozd%2Fdocker-rdiff-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftozd%2Fdocker-rdiff-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftozd%2Fdocker-rdiff-backup/lists"}