Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ronan’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for the feedback. Do you have any more info on that whitescreen? Are there any errors in the logs? If you open up the tarball that is the site archive, do you see your site in there (the files and a copy of the db)?

phillipclarke29’s picture

I have the same problem - trying to restore entire site results in a blank screen at admin/config/system/backup_migrate/settings/destination/list/restorefile/nodesquirrel/TestSite-2014-06-17T19-46-24.sitearchive.tar. I opened up the tarball and I have db, docroot and manifest.ini

I also get a blank screen trying to restore to default database and public files.

I also tried to restore to a local instance and got

Notice: Undefined index: files in theme_backup_migrate_file_list() (line 954 of /Users/philipclarke/Sites/acquia-drupal/sites/default/modules/backup_migrate 2/backup_migrate.module).

I then tried to backup the entire local site and restore and got the same error

francoisleralle’s picture

Hi all,

I have face the same issue trying to restore the entire site. I think the problem is with the public files directory path in _restore_from_file_php(). I have made a patch for that. It works for me on Linux (not Windows) using the interface or drush.

Said that, trying to restore the entire php code won't work. Probably, it will be better to use "git checkout tags". This module can help https://www.drupal.org/project/gittag even if the configuration can be tricky.

Francois

phillipclarke29’s picture

I got File to patch: sources.archivesource.inc
patching file sources.archivesource.inc
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 192 with fuzz 1.

francoisleralle’s picture

Hi Phillip,

the patch should work on the 7.x-3.x-dev version of BAM module. I've not tried to patch it into the master branch.

phillipclarke29’s picture

Installed 7.x-3 and successfully patched - now get

Fatal error: Call to undefined function drupal_clone() in /Users/philipclarke/Sites/acquia-drupal/sites/default/modules/backup_migrate/includes/sources.archivesource.inc on line 210

francoisleralle’s picture

Hey Phillip,

Actually you have to apply this patch too to fix this issue https://www.drupal.org/node/2283701

seattle32’s picture

I have also received a white screen under similar circumstances to the reporter of this bug in step #4. In my case, it was caused by a call to undefined function file_directory_path(), which is obsolete according to Drupal 7 documentation. This particular issue seems to be resolved in the patch posted with this bug by francoisleralle.

TryAgain y veras’s picture

Hi, I am trying to restore my entire site to localhost and got into some errors.

I tried with 2 versions of "Backup and Migrate"...

A."7.x-3.0" in a local fresh site (i am using windows and a fresh drupal 7.31 installation).

  • Did the backup of my site with next details: Backup Source: Entire site (code, files & Database), Backup Destination: download.
  • I got the next error: Notice: Undefined index: files in theme_backup_migrate_file_list() (line 954 of C:\wamp\www\Drupal_7_31_3\sites\all\modules\backup_migrate\backup_migrate.module).

B. 7.x-3.x-dev i though the issue could be solved in the dev version of "Backup and Migrate" and installed it but the problem is that when trying to restore i got the next message: The specified file MySite-2014-04-30T18-42-04.mysql.gz.aes could not be uploaded. Only files with the following extensions are allowed: gz zip sql mysql bz bz2.

  • Why is the "Backup and Migrate" generation a tar file for entire site if then it can not restore that kind of file?

Hope my post make sense! I did not know if i should create a new convesation for that or post it here, so i did both!

Bonlez1325’s picture

Issue summary: View changes

@TryAgain y veras

Why is the "Backup and Migrate" generation a tar file for entire site if then it can not restore that kind of file?

I had the same problem when downloading the backup files. I got .tar files while the module was expecting "gz zip sql mysql bz bz2" extensions.
I was using Safari at first, and I simply tried the same procedure in a different browser (Chrome) and this time i got the files in the correct format (.gz)

So i guess, it has nothing to do with the module itself but simply which browser you use.

Hope this helps

KhaledBlah’s picture

The issue mentioned in #8 has not been resolved yet in the stable release. This is how I fixed it. Not sure if this is correct but it worked for me. Use at your own risk!

--- a/backup_migrate/includes/sources.archivesource.inc	2014-05-15 14:45:10.000000000 +0000
+++ b/backup_migrate/includes/sources.archivesource.inc	2015-01-27 16:30:54.601999192 +0000
@@ -202,7 +202,7 @@
 
       // Move the files from the temp directory.
       if ($filepath && file_exists($filepath)) {
-        _backup_migrate_move_files($filepath, file_directory_path());
+        _backup_migrate_move_files($filepath, drupal_realpath('public://'));
       }
       else {
         _backup_migrate_message('Files were not restored because the archive did not seem to contain a files directory or was in a format that Backup and Migrate couldn\'t read', array(), 'warning');
nikkwong’s picture

@TryAgain y veras

Why is the "Backup and Migrate" generation a tar file for entire site if then it can not restore that kind of file?
I had the same problem when downloading the backup files. I got .tar files while the module was expecting "gz zip sql mysql bz bz2" extensions.
I was using Safari at first, and I simply tried the same procedure in a different browser (Chrome) and this time i got the files in the correct format (.gz)

So i guess, it has nothing to do with the module itself but simply which browser you use.

Hope this helps

I have tried both browsers and they are both producing tar's only.

sdlieb’s picture

Hi All,
I don't have the same problem but one related. When I try to restore a entire site from saved backup I get

The website encountered an unexpected error. Please try again later.

Any thoughts on this?

Thanks

jmonarch’s picture

same error here. BAM exported a tar file. now it wont recognize the tar when i try to restore. Here is the error

The specified file "filename".tar could not be uploaded. Only files with the following extensions are allowed: gz zip sql mysql bz bz2.

Why would BAM export a tar if it could not use that same file to restore?

Backup was performed (full site, default settings, from remote workstation)

saidbakr’s picture

I have the error:

Fatal error: Call to undefined function drupal_clone()

I backup full site (code and databsae).

JKingsnorth’s picture

Same problem as jmonarch in #14- but it looks as though more than one issue might be at play here. So I've opened a seperate issue for this: #2466235: Cannot restore full site from tar.gz

jackenmail’s picture

Open your settings.php, insert line as follow

<?php
$config['error_level'] = 2
?>

After that refresh your page, now you will able to see list of error.

ronan’s picture

@saidbakr

I'm not finding a reference to that function anywhere in my module. Can you post the rest of the error message? The bit where it says what the file and line number is?

fastturtle’s picture

Hi guys, I hope this helps:

P.S. Probably you'll get some warnings but it works. Tested on vista and win7.

rocketeerbkw’s picture

If you get a fatal error

Fatal error: Call to undefined function file_directory_path() in sources.archivesource.inc on line 211

try the patch in #2618516: Fatal error when restoring "Entire Site"

kenorb’s picture

Status: Postponed (maintainer needs more info) » Active

This function doesn't exist anymore in Drupal 7, therefore it should be replaced.

$ drush -y dl backup_migrate-7 --dev
Project backup_migrate (7.x-3.x-dev) downloaded to /Users/kenorb/temp/drupal/contrib/backup_migrate.
$ grep -R file_directory_path .
./backup_migrate/includes/sources.archivesource.inc:        _backup_migrate_move_files($filepath, file_directory_path());

See: https://api.drupal.org/api/drupal/includes%21file.inc/function/file_dire...

Related: Why does nothing change when I attempt to restore a backup?

kenorb’s picture

Status: Active » Closed (duplicate)
Mugé’s picture

I moved my site to another host and after a number of back-up failures, such as files missing inside modules, my so far last error message after all the clean-up is the above "Failed to restore "Entire site (code, files & DB)". (Drupal 7.51)

This is for a less complicated oversight and solution.

I forgot to update the tmp file path. As an example my tmp path is inside "sites/default/files/downloads/tmp".
> go to admin/configuration/media/
> inside "Temporary directory" enter 'sites/default/files/downloads/tmp' (without the quotes)

pallavi13gupta’s picture

From your root folder try running this command.

$> chcon -R -t httpd_sys_content_rw_t sites/default/files/
$> sudo chmod 777 -R sites/default/files/

httpd_sys_content_rw_t is a label of SELinux. This label allow the Apache process to write and append the content appropriately.
It works for me !