2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-22 10:08:56 +00:00

docs: update backup docs (#1082)

This commit is contained in:
Revant Nandgaonkar 2023-02-17 13:15:49 +05:30 committed by GitHub
parent 0228f06e81
commit bcf41ff9f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -9,10 +9,12 @@ services:
entrypoint: ["bash", "-c"]
command:
- |
bench backup-all-sites
## Uncomment following to snapshot sites
bench --site all backup
## Uncomment for restic snapshots.
# restic snapshots || restic init
# restic backup sites
## Uncomment to keep only last n=30 snapshots.
# restic forget --group-by=paths --keep-last=30 --prune
environment:
# Set correct environment variables for restic
- RESTIC_REPOSITORY=s3:https://s3.endpoint.com/restic
@ -52,3 +54,5 @@ Notes:
- Make sure `docker-compose` or `docker compose` is available in path during execution.
- Change the cron string as per need.
- Set the correct project name in place of `erpnext`.
- For Docker Swarm add it as a [swarm-cronjob](https://github.com/crazy-max/swarm-cronjob)
- Add it as a `CronJob` in case of Kubernetes cluster.

View File

@ -24,13 +24,13 @@ export APPS_JSON='[
"branch": "main"
}
]'
export APPS_JSON_BASE64=$(echo ${APPS_JSON} | base64 --wrap=0)
export APPS_JSON_BASE64=$(echo ${APPS_JSON} | base64 -w 0)
```
You can also generate base64 string from json file:
```shell
export APPS_JSON_BASE64=$(base64 --wrap=0 /path/to/apps.json)
export APPS_JSON_BASE64=$(base64 -w 0 /path/to/apps.json)
```
Note: