[mod] restore

This commit is contained in:
Andy Bunce 2022-03-23 20:46:54 +00:00
parent e8e20b97bb
commit 08eb65a342
2 changed files with 13 additions and 6 deletions

View file

@ -4,6 +4,12 @@
from https://gist.github.com/sinbad/4bb771b916fa8facaf340af3fc49ee43 from https://gist.github.com/sinbad/4bb771b916fa8facaf340af3fc49ee43
### backup_gitea.sh ### Backup
writes to `/mnt/drive/backups/gitea/`
### restore `backup_gitea.sh` writes to `/mnt/drive/backups/gitea/`
### Restore
```bash
#restore_gitea_data.sh [--dry-run] <source_dir> <dest_dir> <sql_file_dest>
./restore_gitea_data.sh /srv/dev-disk-by-uuid-45e2e732-9e00-4a82-a7cc-9c743e033671/datastore/gitea data
```

View file

@ -31,11 +31,12 @@ if [[ "$1" == "--help" ]]; then
fi fi
DRYRUN=0 DRYRUN=0
SOURCE="gitea" #SOURCE="gitea"
DATADIR="data" # /srv/dev-disk-by-uuid-45e2e732-9e00-4a82-a7cc-9c743e033671/datastore/gitea
#DATADIR="data"
SQLDEST="" SQLDEST=""
USER_UID=1000 USER_UID=1000
GROUP_GID=1000 GROUP_GID=100
while (( "$#" )); do while (( "$#" )); do
if [[ "$1" == "--dry-run" ]]; then if [[ "$1" == "--dry-run" ]]; then