Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
cd1558d4
Commit
cd1558d4
authored
Jun 17, 2009
by
anarcat
Committed by
anarcat
Jun 17, 2009
Browse files
#494376
- proper error checking in mysql backups
parent
95cc8530
Changes
1
Hide whitespace changes
Inline
Side-by-side
db_server/backup.provision.inc
View file @
cd1558d4
...
...
@@ -2,7 +2,10 @@
function
drush_provision_mysql_pre_provision_backup
(
$url
=
NULL
)
{
drush_log
(
"Generating mysql dump for
$url
."
,
'backup'
);
provision_shell_exec
(
"mysqldump -h%s -u%s -p%s -rsites/%s/database.sql %s"
,
drush_get_option
(
'db_host'
),
drush_get_option
(
'db_user'
),
drush_get_option
(
'db_passwd'
),
$url
,
drush_get_option
(
'db_name'
));
$result
=
provision_shell_exec
(
"mysqldump -h%s -u%s -p%s -rsites/%s/database.sql %s"
,
drush_get_option
(
'db_host'
),
drush_get_option
(
'db_user'
),
drush_get_option
(
'db_passwd'
),
$url
,
drush_get_option
(
'db_name'
));
if
(
!
$result
&&
!
drush_get_option
(
'force'
,
false
))
{
drush_set_error
(
'PROVISION_BACKUP_FAILED'
,
dt
(
"Could not back up sites directory for drupal"
));
}
}
function
drush_provision_mysql_pre_provision_backup_rollback
(
$url
=
NULL
)
{
...
...
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