1

I have a local site and a development site. I want to replace my development site with my local site. I used the Backup and Migrate module to backup the development site into a .gz file. All good. But when I did the same again with the local environment, it came back as a .tar file, no matter which compression option I chose.

When I tried to restore onto the development site using the local site's tarball, it specified it needs a .gz or .zip file. So I ran:

tar -cvzf 127.0.1.1-2015-01-12T17-23-50.sitearchive.tar.gz 127.0.1.1-2015-01-12T17-23-50.sitearchive.tar

This time, it came back with this error:

Unable to restore from file /tmp/backup_migrate_vbDBRs.0.1.1-2015-01-12t17-23-50.sitearchive.tar because a tar file can't be restored to this database.

How can I correctly restore a backup from my local site onto the development site. Or is this method completely wrong and I should be doing something else, like creating a new site from scratch and restoring that?

  • A tat file is just a "packed" file containing one or more files, which are not compressed (gzip are). Looks like an issue on the module. Try compressing the tar file into gzip. – AyeshK Jan 12 '15 at 11:16
  • @AyeshK, thanks for your idea, but I did what you suggested already with tar -cvzf which turns it into a .tar.gz file, and it came back with the 'Unable to restore...' error. Any more ideas? – dayuloli Jan 12 '15 at 15:18
  • I'm afraid that the problem isn't with the suffix. I used the Backup & Migrate module to download the db (also full site) in various formats, including zip. It won't accept any of these styles -- and it failed even when I copied the various files to the server's backup folder (so I used the option "Restore from saved backups" rather than "from uploaded file"). – Chef Matt Feb 19 '15 at 0:45
  • Have you tried using phpmyadmin export and import? – No Sssweat Feb 19 '15 at 1:00
1

This is not an issue with the module.

The most likely cause of the problem is that your local system is missing gzip, so the backup and migrate module is unable to turn the tar-file into a gzipped tar file.

The command to do that is not tar -cvzf (which you've tried), but gzip. I.e.:

gzip 127.0.1.1-2015-01-12T17-23-50.sitearchive.tar

This should produce a valid 127.0.1.1-2015-01-12T17-23-50.sitearchive.tar.gz, but if you try this on the local system, it will probably fail telling you that it can't locate gzip.

The best fix would be to install gzip on the local system.

Alternatively, you may export the file to some system that has gzip, and do the gizipping there.

  • Thank you for you answer, I will test this out when I'm back at work! – dayuloli Feb 19 '15 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.