2014-08-31 30 views
0

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

其他人有这个问题或有解决方案的想法?

下面是过程的样子:

[email protected]:~/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 
[email protected]m 'restore 
INCLUDE_GIT' 
[email protected]:~/Siesta Solutions Projects and Files/Marias/Backups$ cat 'mariasdaycare.tar.gz' | ssh [email protected]m '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)>' 
[email protected]:~/Siesta Solutions Projects and Files/Marias/Backups$ 
+0

你可以尝试使用--debug标志运行还原命令吗 – niharvey 2014-09-12 20:49:20

回答

0

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