1

I installed Aegir package manually on a Debian server Jessie with (Aegir3, Drush 7.1.0 , provision 7.x-3.4, hostmaster 7.x-3.4) and every thing goes nice, except the backup feature, here is what i done:

I activated the Hosting Site Backup Manager module to automate backups of my websites.

*********i couldn't install aegir in /var/aegir (cause i don't have privileges on other directories on that server), but it installed /production/my_aegir_user that has all aegir privileges user*********

After installation of a new site with Aegir, and when the backup tasks runs, it fails with the following log:

Task starts processing: Backup: www.mydomain.com    
-
Returned from hook drush_hosting_task_validate  
-
Calling hook drush_hosting_alias_pre_hosting_task   
-
Returned from hook drush_hosting_alias_pre_hosting_task 
-
Calling hook drush_hosting_clone_pre_hosting_task   
-
Returned from hook drush_hosting_clone_pre_hosting_task 
-
Calling hook drush_hosting_migrate_pre_hosting_task 
-
Returned from hook drush_hosting_migrate_pre_hosting_task   
-
Calling hook drush_hosting_package_pre_hosting_task 
-
Returned from hook drush_hosting_package_pre_hosting_task   
-
Calling hook drush_hosting_remote_import_pre_hosting_task   
-
Returned from hook drush_hosting_remote_import_pre_hosting_task 
-
Calling hook drush_hosting_site_pre_hosting_task    
-
Returned from hook drush_hosting_site_pre_hosting_task  
-
Calling hook drush_hosting_site_backup_manager_pre_hosting_task 
-
Returned from hook drush_hosting_site_backup_manager_pre_hosting_task   
-
Calling hook drush_hosting_sync_pre_hosting_task    
-
Returned from hook drush_hosting_sync_pre_hosting_task  
-
Calling hook drush_hosting_task 
1 s.
Loaded alias @www.mydomain.com from file /production/my_aegir_user/.drush/www.mydomain.com.alias.drushrc.php    
-
Backend invoke: php /production/my_aegir_user/.composer/vendor/drush/drush/drush.php --backend=2 @www.mydomain.com provision-backup 2>&1    
-
php /production/my_aegir_user/.composer/vendor/drush/drush/drush.php --backend=2 @www.mydomain.com provision-backup 2>&1    
-
Bootstrap to phase 0.   
-
Bootstrap to phase 1.   
-
Drush bootstrap phase : bootstrap_drupal_root() 
-
Loading drushrc "/production/my_aegir_user/platforms/template-uni-to/sites/all/drush/drushrc.php" into "drupal" scope.  
-
Initialized Drupal 7.43 root directory at /production/my_aegir_user/platforms/template-uni-to   
-
Find command files for phase 1 (max=1)  
-
Cache HIT cid: 7.1.0-commandfiles-1-a127e16d6e2aa0bf2587b0cbe8d820d4    
-
Found command: provision-backup (commandfile=provision) 
-
Loaded alias @server_localhost from file /production/my_aegir_user/.drush/server_localhost.alias.drushrc.php    
-
Loaded alias @server_master from file /production/my_aegir_user/.drush/server_master.alias.drushrc.php  
-
Driver type not specified for the db service, provide it with --db_service_type 
-
Loading apache driver for the http service  
-
Driver type not specified for the remote_import service, provide it with --remote_import_service_type   
-
Loading mysql driver for the db service 
-
Driver type not specified for the http service, provide it with --http_service_type 
-
Driver type not specified for the remote_import service, provide it with --remote_import_service_type   
-
Loaded alias @platform_templateUniTo from file /production/my_aegir_user/.drush/platform_templateUniTo.alias.drushrc.php    
-
Including /production/my_aegir_user/.drush/provision/db/backup.provision.inc    
-
Including /production/my_aegir_user/.drush/provision/platform/backup.provision.inc  
-
Calling hook drush_provision_drupal_provision_backup_validate   
-
Drush bootstrap phase : bootstrap_drupal_site() 
-
Loading drushrc "/production/my_aegir_user/platforms/template-uni-to/sites/www.mydomain.com/drushrc.php" into "site" scope. 
-
Initialized Drupal site www.mydomain.com at sites/www.mydomain.com  
-
Find command files for phase 2 (max=)   
-
Cache HIT cid: 7.1.0-install_profile-c07b6dfdb3c6ead14c4903f1c5a39aca   
-
Cache HIT cid: 7.1.0-commandfiles-2-cb52137e732e7de23aae2ebaea799bcb    
-
Drush bootstrap phase : bootstrap_drupal_configuration()    
-
Find command files for phase 3 (max=)   
-
Returned from hook drush_provision_drupal_provision_backup_validate 
-
Calling hook drush_db_pre_provision_backup  
-
fopen(/production/my_aegir_user/platforms/template-uni-to/sites/www.mydomain.com/database.sql): failed to open stream: Permission denied mysql.php:227  
-
Could not write database backup file mysqldump  
-
filesize(): stat failed for /production/my_aegir_user/platforms/template-uni-to/sites/www.mydomain.com/database.sql mysql.php:263   
-
Undefined variable: err mysql.php:265   
-
Could not generate database backup from mysqldump. (error: )    
-
Returned from hook drush_db_pre_provision_backup    
-
Deleted mysql dump from sites directory 
-
Changes made in drush_db_pre_provision_backup have been rolled back.    
-
Command dispatch complete   
-
Returned from hook drush_hosting_task   
-
Invoking hosting_backup_task_rollback hooks.    
-
Changes made in drush_hosting_task have been rolled back.   
-
Command dispatch complete   
-
Updated task status to "Failed"

****my aegir root is not /var/aegir, but it is at /production/my_aegir_user

1 Answer 1

1

The main error seems to be:

fopen(/production/my_aegir_user/platforms/template-uni-to/sites/www.mydomain.com/database.sql): failed to open stream: Permission denied mysql.php:227

However, there may be other causes. The best way to find it would be to run the task in debug mode.

For example, as the 'aegir' user:

drush @example.org provision-backup --debug

PS: I stumbled on this question because I ran into a similar issue. You may have better chances at getting responses on https://drupal.stackexchange.com/ (and tag your question with 'aegir').

2
  • hi bgm, thanks for your answer, i'll verify and a'll make you know.
    – Ossama
    Jun 17, 2016 at 12:21
  • They've been closing Aegir issues on that site because they're not Drupal-specific (strangely). So I think this is the better site for the moment.
    – colan
    Dec 22, 2018 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.