A backup service for a Nextcloud instance. It backups Postgres and Nextcloud data.
542
This Docker image provides a backup service to backup Nextcloud data and PostgreSQL database. The service can be added into a docker stack with a PostgreSQL instance to backup the database periodically.
When a new backup is made, files from the older backups are hard-linked. This keeps the increments small because they only contain the delta from the previous backup.
pg_dumptarzstdThis service doesn't provide any restore function yet.
/var/www/html)All backups are located in /backups/nextcloud_<date>.
All scripts are located in /usr/local/bin and can be called manually. E.g.
docker exec nextcloud_backup docker-entrypoint.sh backup
The service is supposed to be part of a Docker service stack.
version: '2'
services:
database:
image: postgres
[...]
nextcloud:
image: nextcloud
depends_on:
- database
volumes:
- nextcloud:/var/www/html
[...]
backup:
image: vinado/backup-nextcloud:latest
depends_on:
- nextcloud
volumes:
- nextcloud:/var/www/html:ro
- backups:/backups
environment:
CRON_PERIOD: "0 0 * * 1"
NEXTCLOUD_VOLUME: "/var/www/html"
BACKUP_ROTATIONS: 4
volumes:
nextcloud:
driver: local
backups:
driver: local
The source is available on GitHub. Please report any issues.
To build the image from the Dockerfile run:
docker build -t vinado/backup-nextcloud:latest .
Content type
Image
Digest
Size
151 MB
Last updated
over 4 years ago
docker pull vinado/backup-nextcloud