1.3 KiB
1.3 KiB
Backup & Restore
Requirements
- Host setup with docker and portainer
Process
- Recreate gitea stack removing read only restrictions on duplicati volumes
- Check every Container is ok and running
- Stop every Container except duplicati
- Enter Duplicati
- Import Backup job (if not possible next steps must be adapted)
- Restore with permissions checked
- All Imported jobs schedules must be disabled (or disable write permissions on backup host)
- Restore all files (except and duplicati data) to original location
- If database engine is diferent do not restore db_data and check restore database before next stepswith this processs because duplicati is running!
- Recreate stack gitea with original read only restrictions on duplicati volumes
- Confirm everything is ok and running
- Execute a backup
Database
Only required if not recovarable database data files. (Example: diferent database engine from backup)
- Start Database container
- Enter Database container bash (using portainer)
- Execute:
#select a file to import
ls /db-dumps
#select a file to import
DB_FILE= "file name to import"
#
mysql --host db -uroot -p ${MYSQL_DATABASE} < /db-dumps/$DB_FILE
#enter root password (root password is in enviromnent variable ${MYSQL_ROOT_PASSWORD})