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
Kazuhiko Shiozaki
gitlab-ce
Commits
0a963ee1
Commit
0a963ee1
authored
Feb 27, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pg_force_restore' into 'master'
Pg Force Restore
parents
b2cab1c5
8fe10e64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
lib/backup/database.rb
lib/backup/database.rb
+2
-0
No files found.
lib/backup/database.rb
View file @
0a963ee1
...
@@ -29,6 +29,8 @@ module Backup
...
@@ -29,6 +29,8 @@ module Backup
print
"Restoring MySQL database
#{
config
[
'database'
]
}
... "
print
"Restoring MySQL database
#{
config
[
'database'
]
}
... "
system
(
'mysql'
,
*
mysql_args
,
config
[
'database'
],
in:
db_file_name
)
system
(
'mysql'
,
*
mysql_args
,
config
[
'database'
],
in:
db_file_name
)
when
"postgresql"
then
when
"postgresql"
then
puts
"Destructively rebuilding database schema for RAILS_ENV
#{
Rails
.
env
}
"
Rake
::
Task
[
"db:schema:load"
].
invoke
print
"Restoring PostgreSQL database
#{
config
[
'database'
]
}
... "
print
"Restoring PostgreSQL database
#{
config
[
'database'
]
}
... "
pg_env
pg_env
system
(
'psql'
,
config
[
'database'
],
'-f'
,
db_file_name
)
system
(
'psql'
,
config
[
'database'
],
'-f'
,
db_file_name
)
...
...
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