Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

gitea backup #34

Closed
JulienPalard opened this issue Oct 8, 2022 · 2 comments
Closed

gitea backup #34

JulienPalard opened this issue Oct 8, 2022 · 2 comments

Comments

@JulienPalard
Copy link
Collaborator

JulienPalard commented Oct 8, 2022

Il faudra rajouter un cron de sauvegarde, cf. https://docs.gitea.io/en-us/backup-and-restore/, àla :

rm -fr /var/backups/gitea
mkdir /var/backups/gitea
systemctl stop gitea 
chown git:git /var/backups/gitea/
GITEA_WORK_DIR=/var/lib/gitea sudo -u git --preserve-env=GITEA_WORK_DIR gitea dump -c /etc/gitea/app.ini --file /var/backups/gitea/gitea.zip
sudo -u git pg_dump gitea > /var/backups/gitea/gitea.sql
chown root:root /var/backups/gitea/
chmod 700 /var/backups/gitea/
systemctl start gitea

Puis demander à rsnapshot de passer les prendre.

Innutile de faire des rotations par date, rsnapshot s'en occupe.

@JulienPalard
Copy link
Collaborator Author

C'est fait : a48fb10.

@JulienPalard
Copy link
Collaborator Author

it works:

root@backup1:~# ls -lah /srv/backups/rsnapshot_afpy/daily.0/git.afpy.org/var/backups/gitea/
total 61M
drwx------ 2 root root 4.0K Oct 10 05:00 .
drwxr-xr-x 3 root root 4.0K Oct 10 05:00 ..
-rw-r--r-- 1 root root 235K Oct 10 05:00 gitea.sql
-rw------- 1  997 1001  61M Oct 10 05:00 gitea.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant