- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在 Debian 服务器 Jessie 上手动安装了 Aegir 包(Aegir3,Drush 7.1.0,provision 7.x-3.4,hostmaster 7.x-3.4),一切都很顺利,除了备份功能,这就是我完成了:
我激活了托管站点备份管理器模块来自动备份我的网站。
*********我无法在/var/aegir 中安装 aegir(因为我对该服务器上的其他目录没有权限),但它安装了/production/my_aegir_user,其中包含所有 aegir特权用户*********
使用 Aegir 安装新站点后,当备份任务运行时,它失败并显示以下日志:
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
最佳答案
主要错误似乎是:
fopen(/production/my_aegir_user/platforms/template-uni-to/sites/www.mydomain.com/database.sql): failed to open stream: Permission denied mysql.php:227
但是,可能还有其他原因。找到它的最佳方法是在 Debug模式下运行任务。
例如,作为“aegir”用户:
drush @example.org provision-backup --debug
PS:我偶然发现了这个问题,因为我遇到了类似的问题。您可能有更好的机会在 https://drupal.stackexchange.com/ 上获得回复(并用“aegir”标记您的问题)。
关于linux - Aegir:调用 hook drush_db_pre_provision_backup 后无法从 mysqldump 生成数据库备份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36593139/
我在 Debian 服务器 Jessie 上手动安装了 Aegir 包(Aegir3,Drush 7.1.0,provision 7.x-3.4,hostmaster 7.x-3.4),一切都很顺利,
我是一名优秀的程序员,十分优秀!