Idut home  
 

Idut Support / No restore

You are not logged in.

#1 2008-03-03 14:12:23

JMB
New member
Registered: 2008-03-03
Posts: 3

No restore

Backup is a great script. Thank you very much for.

It works fine for backup but not for restore.
I have the list of files and the message :"restore complete" but no restore. I work with PHP5.

Have you an idea ?

Offline

 

2008-03-03 14:12:23

Advert


#2 2008-03-03 23:12:15

idut
Administrator
Registered: 2007-08-11
Posts: 108

Re: No restore

Check around in your root directory or sub directories.
It is possible that it has worked but just not put it in the right place.

Another thing to try is make the things that you are overwriting CHMOD 777.

Let us know how it goes.

Offline

 

#3 2008-03-04 14:59:11

JMB
New member
Registered: 2008-03-03
Posts: 3

Re: No restore

Thank's for your reply but with "error_reporting(E_ALL);"
I obtain : "Array to string conversion in Tar.php on line 1420"

Offline

 

#4 2008-04-21 17:00:44

stomperz
New member
Registered: 2008-04-13
Posts: 2

Re: No restore

Same experience for me - no restore and loads of "Array to string conversion" with error reporting all.  I am using PHP 5.2.2
I tried a slightly newer version of tar but same problem.  Searched net & found this: http://pear.php.net/bugs/bug.php?id=23 which is essentially the same problem.  Looking at the Tar code I decided to change the reported error line that read:

if (substr($p_file_list[$i], -1) == '/') {

to read (using a similar approach as the pear bug solution)

if (is_string($p_file_list[$i]) && (substr((string)$p_file_list[$i], -1) == '/')) {

I also changed the backup.php line in DoRestore from

$tar->extractList($arr) or die ("Could not extract files!");
to
$tar->extractModify("./restores","") or die ("Could not extract files!");

This successfully restored my files into my /restores directory

Might not be what you want and apologies if it's not quite the best way of doing things.  Thought I would let you know anyway.

Offline

 

#5 2008-04-30 15:23:52

JMB
New member
Registered: 2008-03-03
Posts: 3

Re: No restore

Thank's. It works fine.

Offline

 

#6 2008-09-16 12:48:25

Generaator
New member
Registered: 2008-09-16
Posts: 2

Re: No restore

on tar.php ~1435 line

Code:

for ($i=0; $i<sizeof($p_file_list); $i++) {

          // ----- Look if it is a directory
          if (substr($p_file_list[$i]['filename'], -1) == '/') {

            // ----- Look if the directory is in the filename path

            if ((strlen($v_header['filename']) > strlen($p_file_list[$i]['filename']))

                && (substr($v_header['filename'], 0, strlen($p_file_list[$i]['filename']))

                    == $p_file_list[$i]['filename'])) {

              $v_extract_file = TRUE;

              break;

            }

          }

Last edited by Generaator (2008-10-04 18:34:15)

Offline