Add commands to backup Gitea and copy locally
This commit is contained in:
parent
35df3841b3
commit
b50bf507eb
|
@ -204,3 +204,23 @@ See https://docs.gitea.io/en-us/install-from-binary/#updating-to-a-new-version f
|
|||
12. `sudo systemctl status gitea`
|
||||
- Should be active (running).
|
||||
13. After some period of time, delete the backup file.
|
||||
|
||||
### Regular backups
|
||||
On the server:
|
||||
```bash
|
||||
sudo systemctl stop gitea
|
||||
sudo su - git
|
||||
gitea dump -c /etc/gitea/app.ini -w /var/lib/gitea -t /tmp
|
||||
ls -l --block-size=M
|
||||
rm <old-backup-file>
|
||||
# Grant everyone read access to the backup file.
|
||||
chmod a=r <backup-file>
|
||||
exit
|
||||
sudo systemctl restart gitea
|
||||
```
|
||||
|
||||
On your local machine:
|
||||
```bash
|
||||
# Copy the file locally.
|
||||
scp <user>@<remote_ip>:/home/git/<backup-file> d:\
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue