Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-01-27 21:54:28 +0400
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-01-27 21:55:36 +0400
commit5e2ccc671b8ee1c4b70c504b5b964a8bac259cda (patch)
tree5c0b4fe17e4eed93bbe12dde9a53f71de04a16da /doc
parent8695ab28e6e4a945fe3d8368e69884ec2b5b4ea3 (diff)
Add instructions for backups using cron
Diffstat (limited to 'doc')
-rw-r--r--doc/raketasks/backup_restore.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
index d2da64f3d3c..bdff6ad5da8 100644
--- a/doc/raketasks/backup_restore.md
+++ b/doc/raketasks/backup_restore.md
@@ -78,3 +78,18 @@ Restoring repositories:
- Restoring repository abcd... [DONE]
Deleting tmp directories...[DONE]
```
+
+### Configure cron to make daily backups
+
+```
+cd /home/git/gitlab
+sudo -u git -H editor config/gitlab.yml # Enable keep_time in the backup section to automatically delete old backups
+sudo -u git crontab -e # Edit the crontab for the git user
+```
+
+Add the following lines at the bottom:
+
+```
+# Create a full backup of the GitLab repositories and SQL database every day at 2am
+0 2 * * * cd /home/git/gitlab && PATH=/usr/local/bin:/usr/bin:/bin bundle exec rake gitlab:backup:create RAILS_ENV=production
+```