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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7357ebc4
Commit
7357ebc4
authored
May 06, 2013
by
Lev Abalkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save backup time as is. Fixes #3857.
parent
4d9bdab0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lib/tasks/gitlab/backup.rake
lib/tasks/gitlab/backup.rake
+5
-3
No files found.
lib/tasks/gitlab/backup.rake
View file @
7357ebc4
...
...
@@ -11,10 +11,12 @@ namespace :gitlab do
Rake
::
Task
[
"gitlab:backup:repo:create"
].
invoke
Rake
::
Task
[
"gitlab:backup:uploads:create"
].
invoke
current_time
=
Time
.
now
# saving additional informations
s
=
{}
s
[
:db_version
]
=
"
#{
ActiveRecord
::
Migrator
.
current_version
}
"
s
[
:backup_created_at
]
=
"
#{
Time
.
now
}
"
s
[
:backup_created_at
]
=
current_time
s
[
:gitlab_version
]
=
%x{git rev-parse HEAD}
.
gsub
(
/\n/
,
""
)
s
[
:tar_version
]
=
%x{tar --version | head -1}
.
gsub
(
/\n/
,
""
)
...
...
@@ -25,8 +27,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:
#{
current_time
.
to_i
}
_gitlab_backup.tar ... "
if
Kernel
.
system
(
"tar -cf
#{
current_time
.
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