commit 17a2690d8635cd9745dd31a982e0a7943ba896bc parent c65e58ff928bd3d0d5d1b48ae5c980487b02e511 Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Sat, 3 Aug 2024 15:37:50 +0200 feat: update backup instructions Diffstat:
M | README.md | | | 24 | ++++++++++++++---------- |
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md @@ -130,11 +130,11 @@ docker run -ti --rm \ -v /var/www/ktistec/backups:/backups \ alpine:latest \ sh -c ' -apk update && \ -apk add sqlite && \ -sqlite3 /db/ktistec.db \ -".backup \"/backups/ktistec_backup_$(date +%Y-%m-%d).sq3\"" -'; \ + apk update && \ + apk add sqlite && \ + sqlite3 /db/ktistec.db \ + ".backup \"/backups/ktistec_backup_$(date +%Y-%m-%d).sq3\"" + '; \ docker restart ktistec ``` @@ -158,9 +158,13 @@ tar -cf ${KTISTEC_PATH}/uploads_backup_$(date +%Y-%m-%d).tar \ **Docker (via [this repo's docker-compose](#docker) file):** ```bash -docker exec -ti ktistec \ - sh -c " - tar -cf /backups/uploads_backup_$(date +%Y-%m-%d).tar \ - /app/public/uploads/ - " +docker run -ti --rm \ + -v /var/www/ktistec/uploads:/uploads \ + -v /var/www/ktistec/backups:/backups \ + alpine:latest \ + sh -c ' + apk update && \ + apk add tar && \ + tar -vcf /backups/uploads_backup_$(date +%Y-%m-%d).tar /uploads/ + ' ```