Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
7a7ec1ac
Commit
7a7ec1ac
authored
Feb 28, 2017
by
Jon Keys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add storage class configuration option for Amazon S3 remote backups
parent
261f5a68
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
1 deletion
+11
-1
changelogs/unreleased/backup_storage_class.yml
changelogs/unreleased/backup_storage_class.yml
+4
-0
config/gitlab.yml.example
config/gitlab.yml.example
+2
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
doc/raketasks/backup_restore.md
doc/raketasks/backup_restore.md
+2
-0
lib/backup/manager.rb
lib/backup/manager.rb
+2
-1
No files found.
changelogs/unreleased/backup_storage_class.yml
0 → 100644
View file @
7a7ec1ac
---
title
:
Add storage class configuration option for Amazon S3 remote backups
merge_request
:
author
:
Jon Keys
config/gitlab.yml.example
View file @
7a7ec1ac
...
@@ -483,6 +483,8 @@ production: &base
...
@@ -483,6 +483,8 @@ production: &base
# multipart_chunk_size: 104857600
# multipart_chunk_size: 104857600
# # Turns on AWS Server-Side Encryption with Amazon S3-Managed Keys for backups, this is optional
# # Turns on AWS Server-Side Encryption with Amazon S3-Managed Keys for backups, this is optional
# # encryption: 'AES256'
# # encryption: 'AES256'
# # Specifies Amazon S3 storage class to use for backups, this is optional
# # storage_class: 'STANDARD'
## GitLab Shell settings
## GitLab Shell settings
gitlab_shell:
gitlab_shell:
...
...
config/initializers/1_settings.rb
View file @
7a7ec1ac
...
@@ -399,6 +399,7 @@ if Settings.backup['upload']['connection']
...
@@ -399,6 +399,7 @@ if Settings.backup['upload']['connection']
end
end
Settings
.
backup
[
'upload'
][
'multipart_chunk_size'
]
||=
104857600
Settings
.
backup
[
'upload'
][
'multipart_chunk_size'
]
||=
104857600
Settings
.
backup
[
'upload'
][
'encryption'
]
||=
nil
Settings
.
backup
[
'upload'
][
'encryption'
]
||=
nil
Settings
.
backup
[
'upload'
][
'storage_class'
]
||=
nil
#
#
# Git
# Git
...
...
doc/raketasks/backup_restore.md
View file @
7a7ec1ac
...
@@ -175,6 +175,8 @@ For installations from source:
...
@@ -175,6 +175,8 @@ For installations from source:
remote_directory
:
'
my.s3.bucket'
remote_directory
:
'
my.s3.bucket'
# Turns on AWS Server-Side Encryption with Amazon S3-Managed Keys for backups, this is optional
# Turns on AWS Server-Side Encryption with Amazon S3-Managed Keys for backups, this is optional
# encryption: 'AES256'
# encryption: 'AES256'
# Specifies Amazon S3 storage class to use for backups, this is optional
# storage_class: 'STANDARD'
```
```
If you are uploading your backups to S3 you will probably want to create a new
If you are uploading your backups to S3 you will probably want to create a new
...
...
lib/backup/manager.rb
View file @
7a7ec1ac
...
@@ -51,7 +51,8 @@ module Backup
...
@@ -51,7 +51,8 @@ module Backup
if
directory
.
files
.
create
(
key:
tar_file
,
body:
File
.
open
(
tar_file
),
public:
false
,
if
directory
.
files
.
create
(
key:
tar_file
,
body:
File
.
open
(
tar_file
),
public:
false
,
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
encryption:
Gitlab
.
config
.
backup
.
upload
.
encryption
)
encryption:
Gitlab
.
config
.
backup
.
upload
.
encryption
,
storage_class:
Gitlab
.
config
.
backup
.
upload
.
storage_class
)
$progress
.
puts
"done"
.
color
(
:green
)
$progress
.
puts
"done"
.
color
(
:green
)
else
else
puts
"uploading backup to
#{
remote_directory
}
failed"
.
color
(
:red
)
puts
"uploading backup to
#{
remote_directory
}
failed"
.
color
(
:red
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment