Kopia, with additional features :)
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| bin | ||
| Dockerfile | ||
| README.md | ||
KopiaPlus
Kopia is an incremental backup/restore tool. This fork extends it with a few features:
- Access to the
dockercommand within the container - Scripts to backup/restore named volumes in docker
- Scripts to backup/restore databases running in docker
Usage
Given this docker-compose.yml file:
services:
kopia:
image: forgejo.umucat.day/snowy/kopiaplus
environment:
KOPIAPLUS_BACKUP_DIR: "${HOME}/Backups"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
docker compose run --rm -it kopia backup_docker minecraft
Running the above command will backup the minecraft named volume to the ${HOME}/Backups directory on the host system.
Environment Variables
Backup
| Name | Default | Description |
|---|---|---|
| KOPIAPLUS_BACKUP_DIR | - | Required, the absolute directory of where backups should be written to |
| KOPIAPLUS_BACKUP_PGUSER | postgres | The user used to access the postgres database |
Restore
| Name | Default | Description |
|---|---|---|
| KOPIAPLUS_RESTORE_DIR | - | Required, the absolute directory of where backups should be read from |
| KOPIAPLUS_RESTORE_PGUSER | postgres | The user used to access the postgres database |
Scripts
Backup
backup_docker <volume_name...>
backup_mysql <container_name> <database_name...>
backup_postgres <container_name> <database_name...>
Restore
restore_docker <volume_name...>
restore_mysql <container_name> <database_name...>
restore_postgres <container_name> <database_name...>