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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
8b64df58
Commit
8b64df58
authored
May 27, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4067 from bbodenmiller/patch-5
add code comment about backing up folder when restoring
parents
9351a295
d0b04b03
Changes
1
Hide 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 @
8b64df58
...
...
@@ -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