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
d0b04b03
Commit
d0b04b03
authored
May 27, 2013
by
Ben Bodenmiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify restore
parent
d58aca06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lib/backup/uploads.rb
lib/backup/uploads.rb
+6
-2
No files found.
lib/backup/uploads.rb
View file @
d0b04b03
...
...
@@ -15,11 +15,15 @@ module Backup
end
def
restore
backup_existing_uploads_dir
FileUtils
.
cp_r
(
backup_uploads_dir
,
app_uploads_dir
)
end
def
backup_existing_uploads_dir
if
File
.
exists?
(
app_uploads_dir
)
FileUtils
.
mv
(
app_uploads_dir
,
Rails
.
root
.
join
(
'public'
,
"uploads.
#{
Time
.
now
.
to_i
}
"
))
end
FileUtils
.
cp_r
(
backup_uploads_dir
,
app_uploads_dir
)
end
end
end
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