Commit 0d41aef17647021c8265b762ffd2e052ba35320e
Exists in
master
and in
15 other branches
Merge branch 'cron-up' into 'master'
Cron Up
Showing
1 changed file
with
15 additions
and
0 deletions
Show diff stats
README.md
| @@ -86,6 +86,21 @@ sudo gitlab-rake gitlab:backup:create | @@ -86,6 +86,21 @@ sudo gitlab-rake gitlab:backup:create | ||
| 86 | This will store a tar file in `/var/opt/gitlab/backups`. The filename will look like | 86 | This will store a tar file in `/var/opt/gitlab/backups`. The filename will look like |
| 87 | `1393513186_gitlab_backup.tar`, where 1393513186 is a timestamp. | 87 | `1393513186_gitlab_backup.tar`, where 1393513186 is a timestamp. |
| 88 | 88 | ||
| 89 | +### Scheduling a backup | ||
| 90 | + | ||
| 91 | +To schedule a cron job that backs up your repositories and GitLab metadata, use the root user: | ||
| 92 | + | ||
| 93 | +``` | ||
| 94 | +sudo su - | ||
| 95 | +crontab -e | ||
| 96 | +``` | ||
| 97 | + | ||
| 98 | +There, add the following line to schedule the backup for everyday at 2 AM: | ||
| 99 | + | ||
| 100 | +``` | ||
| 101 | +0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create | ||
| 102 | +``` | ||
| 103 | + | ||
| 89 | ### Restoring an application backup | 104 | ### Restoring an application backup |
| 90 | 105 | ||
| 91 | We will assume that you have installed GitLab from an omnibus package and run | 106 | We will assume that you have installed GitLab from an omnibus package and run |