The function pclose seems to not return the return code of the execusion.
I read on some forum that to have the real code we must use :
$ret=(pclose($fp)>>8)&0xFF;
instead of
//$retval = pclose($fp);

http://fr.php.net/manual/fr/function.pclose.php

With this correction my backup is now OK.
Je suis en version 4.4.4 de php.

Y also recommande to automaticly diseable the backup directory.
I add the three line in the file functions.inc.php
if ($file == $prefix_dir) {
continue;
}
And I change the prototype of backup_get_files function as :
backup_get_files(&$file_list, $prefix_dir)

CommentFileSizeAuthor
functions.inc_.php_.txt9.57 KBguenneguez_t

Comments

dmuth’s picture

Assigned: Unassigned » dmuth

Duly noted. I'll put this on my ever growing TODO list. :-P

-- Doug

dmuth’s picture

Status: Active » Closed (works as designed)

Hi,

According to http://us2.php.net/pclose, pclose() now returns the exit status in the low-order byte.

Regarding your suggestion to disable the backup directory, I specifically chose not to do that, because I have no guarantee that someone will not set the backup directory to be their sites/ directory or someplace equally silly. If I were to implement that logic, said directory would then be excluded. I make use of the function backup_is_backup() to exclude any pre-existing backup files from the backup.

Thank you for the suggestions, though. I appreciate the concern.

-- Doug

dmuth’s picture

Status: Closed (works as designed) » Closed (fixed)

Hi again,

After some thought, it occured to me a way to implement your suggestion of excluding the backup directory and ensuring that no legitimate data got excluded, so I went ahead and implemented it in the next release of the backup module!

You can view the status of the next release at http://drupal.org/node/151077

-- Doug