BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e8b963fc
Commit
e8b963fc
authored
May 13, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3858 from abalkin/issue-3857
Save backup time as is. Fixes #3857.
parents
81e60294
cef76fdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
backup.rake
lib/tasks/gitlab/backup.rake
+4
-3
No files found.
lib/tasks/gitlab/backup.rake
View file @
e8b963fc
...
...
@@ -11,10 +11,11 @@ namespace :gitlab do
Rake
::
Task
[
"gitlab:backup:repo:create"
].
invoke
Rake
::
Task
[
"gitlab:backup:uploads:create"
].
invoke
# saving additional informations
s
=
{}
s
[
:db_version
]
=
"
#{
ActiveRecord
::
Migrator
.
current_version
}
"
s
[
:backup_created_at
]
=
"
#{
Time
.
now
}
"
s
[
:backup_created_at
]
=
Time
.
now
s
[
:gitlab_version
]
=
%x{git rev-parse HEAD}
.
gsub
(
/\n/
,
""
)
s
[
:tar_version
]
=
%x{tar --version | head -1}
.
gsub
(
/\n/
,
""
)
...
...
@@ -25,8 +26,8 @@ namespace :gitlab do
end
# create archive
print
"Creating backup archive:
#{
Time
.
now
.
to_i
}
_gitlab_backup.tar ... "
if
Kernel
.
system
(
"tar -cf
#{
Time
.
now
.
to_i
}
_gitlab_backup.tar repositories/ db/ uploads/ backup_information.yml"
)
print
"Creating backup archive:
#{
s
[
:backup_created_at
]
.
to_i
}
_gitlab_backup.tar ... "
if
Kernel
.
system
(
"tar -cf
#{
s
[
:backup_created_at
]
.
to_i
}
_gitlab_backup.tar repositories/ db/ uploads/ backup_information.yml"
)
puts
"done"
.
green
else
puts
"failed"
.
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