No description
- Shell 70.2%
- PowerShell 29.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docker-compose.yml | ||
| generate-secrets.ps1 | ||
| generate-secrets.sh | ||
| post-snapshot.sh | ||
| pre-snapshot.sh | ||
| README.md | ||
| restore-database.sh | ||
| stack.env | ||
kopia-server
Short how to use:
- Generate secret files with generate-secrets.sh (Linux) or generate-secrets.ps1 (Windows), remember to copy the files before deploying
- Deploy via Portainer-CE git stack as usual, remember to use the included stack.env when deploying
- Log in, credentials are the generated kopiaui_username.txt and kopiaui_password.txt
- Inside KopiaUI Create a Repository, local folder, point it to /repository
- Alternatively you can create any other type of repository, but DO NOT CREATE "KOPIA*"" ones!
- Go to Policies, edit the Global Policy:
- Snapshot Retention: set as you please
- Compression: zstd (recommended by me)
- Snapshots -> New Snapshot:
- path: /backups/[select a subfolder] -> click "Estimate" to check
- Snapshot actions -> Before Snapshot: /backups/zipline/pre-snapshot.sh (sample file is in this repo, remember to set executable flag!)
- Snapshot actions -> After Snapshot: /backups/zipline/post-snapshot.sh (sample file is in this repo, remember to set executable flag!)
- Configure the rest of the policies not defined by global
- Hit Snapshot Now to finish the setup
The execution of pre-snapshot.sh and post-snapshot.sh is only needed if the given stack has a running PostgreSQL database! Remember that by standard docker security practices, the pre-snapshot.sh expects secrets to be inside the container: PG_USER and PG_PASSWORD, PG_DATABASE needs to be added manually. Remember to edit "CONFIGURATION — edit per stack" section on both pre-snapshot.sh and post-snapshot.sh Currently only this database has example files.