在openshift上为drupal应用程序恢复失败

时间:2014-08-31 21:32:48

标签: drupal openshift

在尝试将我的drupal应用程序恢复到openshift设备时,我一直都会遇到失败。我能够恢复我的应用程序的唯一方法是删除它然后重新创建应用程序然后将还原数据添加到新创建的应用程序。它看起来像权限错误。

是否有其他人遇到此问题或有解决方案的想法?

以下是该流程的样子:

andy@hermes:~/Siesta Solutions Projects and Files/Marias/Backups$ rhc snapshot restore  mariadaycare -f mariasdaycare.tar.gz
Restoring from snapshot mariasdaycare.tar.gz to application 'mariadaycare' ... 
Error in trying to restore snapshot. You can try to restore manually by running:
cat 'mariasdaycare.tar.gz' | ssh
54034e07e0b8cd2608000659@mariadaycare-siestasolutions.rhcloud.com 'restore
INCLUDE_GIT'
andy@hermes:~/Siesta Solutions Projects and Files/Marias/Backups$ cat 'mariasdaycare.tar.gz' | ssh 54034e07e0b8cd2608000659@mariadaycare-siestasolutions.rhcloud.com 'restore INCLUDE_GIT'
Removing old git repo: ~/git/mariadaycare.git/
Removing old data dir: ~/app-root/data/*
Restoring ~/git/mariadaycare.git and ~/app-root/data
/bin/tar: app-root/data/sites/default/settings.php: Cannot open: Permission denied
/bin/tar: Exiting with failure status due to previous errors
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/utils/shell_exec.rb:133:in `block (2 levels) in oo_spawn': Shell command '/bin/tar --strip=2 --overwrite -xmz ./*/app-root/data ./*/app-deployments ./*/git --transform="s|${OPENSHIFT_GEAR_NAME}/data|app-root/data|" --transform="s|git/.*\.git|git/${OPENSHIFT_GEAR_NAME}.git|" --exclude="./*/app-root/runtime/data" --exclude="./*/mysql/data" --exclude="./*/php/data" --exclude="./*/phpmyadmin/data" --exclude="./*/cron/data" --exclude="./*/git/*.git/hooks" 1>&2' returned an error. rc=2 (OpenShift::Runtime::Utils::ShellExecutionException)
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/utils/shell_exec.rb:96:in `pipe'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/utils/shell_exec.rb:96:in `block in oo_spawn'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/utils/shell_exec.rb:95:in `pipe'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/utils/shell_exec.rb:95:in `oo_spawn'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-container-selinux-0.10.1/lib/openshift/runtime/containerization/selinux_container.rb:368:in `run_in_container_context'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/model/application_container.rb:795:in `run_in_container_context'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/model/application_container_ext/snapshots.rb:259:in `extract_restore_archive'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.28.6/lib/openshift-origin-node/model/application_container_ext/snapshots.rb:162:in `restore'
from /usr/bin/gear:585:in `block (2 levels) in <main>'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:62:in `run!'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/delegates.rb:11:in `run!'
from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/import.rb:10:in `block in <top (required)>'
andy@hermes:~/Siesta Solutions Projects and Files/Marias/Backups$ 

1 个答案:

答案 0 :(得分:0)

我多次遇到同样的问题。有一次,它失败然后我登录,更改settings.php和默认/齿轮(chmod + w,而不是快照)的权限,将快照上传到齿轮并手动恢复快照(cat&# 39; /path/to/snapshot_file.tar.gz' | oo-restore INCLUDE_GIT)。它奏效了。我知道这似乎不合逻辑,但也许你可以试试。