SID-02454: How long should I wait for Restore to get started?
| Status: |
Answered |
TWiki version: |
6.1.0 |
Perl version: |
5.16.3 |
| Category: |
BackupRestorePlugin |
Server OS: |
Centos 7.8, kernel 3.10 |
Last update: |
5 years ago |
I'm trying to go from 6.0.2 to 6.1.0 of TWiki as per the guidelines on [Plugins.BackupRestorePlugin] under the sub-heading "How to Upgrade TWiki". I get the menu as shown in the guide and click "Restore from backup". I have been waiting for an hour now, the animations (circle, flashing squares) are going and it says "Restoring from backup now, please wait" but nothing has been copied AFAIK. There are 275Gb free and the backup file is 130Gb. The system is an Intel i5 with four cores and 8Gb RAM.
--
John Huber - 2020-09-17
Discussion and Answer
I turned on debiugging and got the following in stderr.txt in the temp directory:
view: Can't exec "/var/www/twiki/bin/backuprestore": No such file or directory at /var/www/twiki/lib/TWiki/Plugins/BackupRestorePlugin/ProcDaemon.pm line 264.
which is weird because the
BackupRestorePlugin is checked when I run configure. More than that, the console shows the zip file and seems to work right as well as debu gging turning on.
Also, the file /var/www/twiki/bin/backuprestore exists, is owned by the webserver and is executable so this must refer to some other file?
--
John Huber - 2020-09-17
Thanks for the debug info. That is strange. Pure guess: Is this on a hosted environment? Some configurations are picky with permissions of cgi executables, a 775 does not work, whereas a 755 does.
--
Peter Thoeny - 2020-09-18
You can also do a backup from the shell:
./backuprestore create_backup
--
Peter Thoeny - 2020-09-18
The original question reflected physical computers, not VMs. I will try "%chmod 755 /var/www/twiki/bin/backuprestore" and run it by hand under TWiki6.1.0. Do I need to chmod on the whole /lib and /bin folders (I guess that couldn't hurt)?
My current production system is
CentOS6 with TWiki 6.0.2 which runs 24/7 (call it "A"). What I did was stand up a physical C7 system (B) and rsynced /var/www/twiki into it after prepping Apache 2.4 (vs 2.2 in production). "B" appears to be fully functional, including
BackupRestore. I then stood up a physical C7/TWiki6.1.0 box (C). I ran configure, logged in as admin and tried to restore a backup from "B" and that's what didn't work. I then put a C7/6.1.0 system on a VM (using Virtualbox, call it "D"). Computers C and D can neither create nor restore a
BackupRestore zip file from the Console. Under further testing on "D" I created a user account on and also a Web so i think it's fine otherwise. It bears mentioning that on C and D I used the process described at
https://www.rosehosting.com/blog/install-twiki-on-a-centos-7-vps/
to set up perl (did the rest my way, using the twiki.conf configurator for instance).
Line 246 in the library routine is trying to do something it calls "exec_command", which suggests to me it somehow comes down to the perl environment. I have to believe somebody out there has a cookbook solution.
Thank you for the personal attention.
--
John Huber - 2020-09-18
This is weird:
[root@bandersnatch]# cd /var/www/twiki/bin
[root@bandersnatch]# ls -l ./backuprestore
-rwxr-xr-x 1 apache apache 2066 Jul 15 2018 ./backuprestore
[root@bandersnatch]# ./backuprestore create_backup
bash: ./backuprestore: /ms/dist/perl5/bin/perl5.26.1: bad interpreter: No such file or directory
There is no root level directory "ms". Second thing, clearly the perl environment setup from the rosehosting site produces something in /usr/local/ that thinks it's a different (not 5.16) version of perl. This is something I don't get. Without that particular perl setup, TWiki won't function though. Back under
CentOS 6 the epel repos conatined all the perl CPAN mods I needed and I could just do "% yum install perl-<CPAN Module> and get all I needed, but under C7 that doesn't work. I created system B about a month ago and maybe I missed a step in the perl config, I'll try an install on a VM and get all I can from epel and then cherry-pick the rosehosting CPANs for only what is needed.
--
John Huber - 2020-09-18
Sorry, cut and pasted the command sequence, here it is more clearly:
[root]# cd /var/www/twiki/bin
[root]# ls -l ./backuprestore
-rwxr-xr-x 1 apache apache 2066 Jul 15 2018 ./backuprestore
[root]# ./backuprestore create_backup
bash: ./backuprestore: /ms/dist/perl5/bin/perl5.26.1: bad interpreter: No such file or directory
--
John Huber - 2020-09-18
Okay, egg on my face. I don't usually expect to have to edit the code in a software distribution, but all you have to do is open /var/www/twiki/bin/backuprestore and change:
"/ms/dist/perl5.26.1" to (in my case) "/usr/bin/perl" or wherever the perl binary resides on your system.
I'll close without further comment.
--
John Huber - 2020-10-03
--
John Huber - 2020-10-04
Thanks for reporting the fix. I just checked, the current distribution has the default
#!/usr/bin/perl -w, so we should be Ok.
--
Peter Thoeny - 2020-10-05
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.