Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
provision
Commits
f957768e
Commit
f957768e
authored
Oct 22, 2009
by
anarcat
Committed by
anarcat
Oct 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#559454
- backup using gzip only when relevant
parent
7b8f72d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
platform/backup.provision.inc
platform/backup.provision.inc
+6
-1
No files found.
platform/backup.provision.inc
View file @
f957768e
...
@@ -49,7 +49,12 @@ function drush_provision_drupal_provision_backup($url) {
...
@@ -49,7 +49,12 @@ function drush_provision_drupal_provision_backup($url) {
$backup_file
=
drush_get_option
(
'backup_file'
);
$backup_file
=
drush_get_option
(
'backup_file'
);
// Adds the site directory into the backup file
// Adds the site directory into the backup file
drush_log
(
dt
(
"Adding sites directory to !backup_file"
,
array
(
'!backup_file'
=>
$backup_file
)),
'backup'
);
drush_log
(
dt
(
"Adding sites directory to !backup_file"
,
array
(
'!backup_file'
=>
$backup_file
)),
'backup'
);
$result
=
provision_shell_exec
(
"tar -C %s -p -c -z -f %s ."
,
drush_get_option
(
'sites_path'
)
.
"/
$url
"
,
$backup_file
);
if
(
substr
(
$backup_file
,
-
2
)
==
'gz'
)
{
$command
=
"tar -C %s -p -c -z -f %s ."
;
}
else
{
$command
=
"tar -C %s -p -c -f %s ."
;
}
$result
=
provision_shell_exec
(
$command
,
drush_get_option
(
'sites_path'
)
.
"/
$url
"
,
$backup_file
);
if
(
!
$result
&&
!
drush_get_option
(
'force'
,
false
))
{
if
(
!
$result
&&
!
drush_get_option
(
'force'
,
false
))
{
drush_set_error
(
'PROVISION_BACKUP_FAILED'
,
dt
(
"Could not back up sites directory for drupal"
));
drush_set_error
(
'PROVISION_BACKUP_FAILED'
,
dt
(
"Could not back up sites directory for drupal"
));
...
...
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