Skip to content

Commit dcdfa6e

Browse files
committed
auto-backup crontab example
1 parent aca50de commit dcdfa6e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,33 @@ This will shut down the container, restore (overwrite!) the backup files into th
5454
./volumes_restore.sh ./../my_backup_dir/
5555
```
5656

57+
## Auto-Backup Example
58+
59+
Create a 'backup_gitea.sh' file in your home directory, with this content:
60+
```
61+
cd /home/roel/gitea-docker && ./volumes_backup.sh /mnt/nas_gitea/
62+
```
63+
64+
Make it executable:
65+
```
66+
chmod +x backup_gitea.sh
67+
```
68+
69+
Run backup script every day at 05:00 AM
70+
```
71+
sudo crontab -e
72+
73+
0 5 * * * /home/roel/gitea-docker/backup_gitea.sh
74+
```
75+
76+
77+
Run it directly with:
78+
```
79+
./backup_gitea.sh
80+
```
81+
82+
83+
5784
# 5. Update gitea version
5885

5986
First, set the new version number in 'docker-compose.yml'.

0 commit comments

Comments
 (0)