summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axilleas@axilleas.me>2016-01-04 08:42:39 +0000
committerAchilleas Pipinellis <axilleas@axilleas.me>2016-01-04 08:42:39 +0000
commit34e1c18c53d584e46165fcfdce72a0b23443d22c (patch)
treeee43c1763ba5ed56c7c811b961b5140263ae4efc /doc
parent0a62d3b5d55311eb425e92ca161d1786d16d2a0c (diff)
parent8662f4737b8d5eeebbe8e5e527f6e2148fea2ddf (diff)
downloadgitlab-ce-34e1c18c53d584e46165fcfdce72a0b23443d22c.tar.gz
Merge branch 'docs/local-share-upload' into 'master'
docs: raketasks: Add documentation on uploading to mounted shares Fog has a local storage provider, which can be use to copy backups to locally mounted cifs / nfs / smb shares. This MR adds documentation to doc/raketasks/backup_restore.md in response to #3387. @stanhu I found some time tonight and was able to get this started earlier than I initially expected, glad I could contribute. See merge request !2246
Diffstat (limited to 'doc')
-rw-r--r--doc/raketasks/backup_restore.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
index 093450a6de3..cdd6652b7b0 100644
--- a/doc/raketasks/backup_restore.md
+++ b/doc/raketasks/backup_restore.md
@@ -153,6 +153,49 @@ with the name of your bucket:
}
```
+### Uploading to locally mounted shares
+
+You may also send backups to a mounted share (`NFS` / `CIFS` / `SMB` / etc.) by
+using the [`Local`](https://github.com/fog/fog-local#usage) storage provider.
+The directory pointed to by the `local_root` key **must** be owned by the `git`
+user **when mounted** (mounting with the `uid=` of the `git` user for `CIFS` and
+`SMB`) or the user that you are executing the backup tasks under (for omnibus
+packages, this is the `git` user).
+
+The `backup_upload_remote_directory` **must** be set in addition to the
+`local_root` key. This is the sub directory inside the mounted directory that
+backups will be copied to, and will be created if it does not exist. If the
+directory that you want to copy the tarballs to is the root of your mounted
+directory, just use `.` instead.
+
+For omnibus packages:
+
+```ruby
+gitlab_rails['backup_upload_connection'] = {
+ :provider => 'Local',
+ :local_root => '/mnt/backups'
+}
+
+# The directory inside the mounted folder to copy backups to
+# Use '.' to store them in the root directory
+gitlab_rails['backup_upload_remote_directory'] = 'gitlab_backups'
+```
+
+For installations from source:
+
+```yaml
+ backup:
+ # snip
+ upload:
+ # Fog storage connection settings, see http://fog.io/storage/ .
+ connection:
+ provider: Local
+ local_root: '/mnt/backups'
+ # The directory inside the mounted folder to copy backups to
+ # Use '.' to store them in the root directory
+ remote_directory: 'gitlab_backups'
+```
+
## Backup archive permissions
The backup archives created by GitLab (123456_gitlab_backup.tar) will have owner/group git:git and 0600 permissions by default.