Actions Performed
Discovery
I visited the Backup and Migrate project page and read the first line of the project description:
> Back up and restore your Drupal MySQL database, code, and files or migrate a site between environments.
I assumed this means it is possible to both backup and restore files.
Going through the Docs
I consumed the various pieces of documentation recommended under the Resources and Documentation section on the project home page:
* Backup and Migrate video series
* Lullabot's introduction to Backup and Migrate
* Daily Dose of Drupal's intro screencast.
None seemed to cover the process of restoring the 'Public Files Directory'
Trying it out
Backing up the Public Files Directory
* I had previously used a Media field to upload a number of images into my files directory so it was populated with some content.
* I used Drush to download and enable Backup and Migrate version 7.x-3.1 onto my Drupal installation which runs on Vagrant Drupal Development virtual machine.
* I logged into my Drupal application as user number 1 (admin)
* I navigated to Configuration > System > Backup and Migrate > Backup > Quick Backup
* Performed a backup with the following settings:
Ensure the settings are :
- Backup my
Public Files Directory
toDownload
usingDefault Settings
- Save an offsite copy to NodeSquirrel:
Unchecked
- Add a note to the backup:
Unchecked
* Clicked Backup now
and saved the resulting file on my local hard drive.
Attempting to Restore the Public Files Directory
* I edited some files and content type records to change the contents of the files directory.
* I navigated to Configuration > System > Backup and Migrate > Restore
The instructions say:
> Upload a backup and migrate backup file.
and assumed that this would refer to the backup file that I had just created.
* I chose:
Restore from an uploaded file > Upload a Backup File > Browse: MyDrupalSite-2015-10-15T00-31-22.tar.zip
* I ignored the Advanced Options as is.
* I clicked Restore now
Expected
I expected to see a success message and for the files in my files directory to have been restored to the state in the backup file.
Actual Result
I got an error message saying:
> Unable to restore from file /tmp/backup_migrate_H02eVt.tar because a tar file can't be restored to this database.
--------
So, I am wondering is it even possible to use Backup and Migrate 7.x-3.1's 'Restore from an uploaded file' to restore a Backup of my 'Public Files Directory'?
If not, please mention this somewhere in the Project home page or point to the docs where this is mentioned from the Project Home page.
Comments
Comment #2
Johnnie Walker CreditAttribution: Johnnie Walker as a volunteer commentedComment #3
Johnnie Walker CreditAttribution: Johnnie Walker as a volunteer commentedComment #4
ronan CreditAttribution: ronan commentedOn the restore screen there should be a pulldown to pick where you're restoring to. You need to set that to the public files directory, then upload the file and click restore. If that doesn't work for whatever reason, the backup is simply a tarball of the directory, you can just un-tar it over your existing files directory.
Comment #5
Johnnie Walker CreditAttribution: Johnnie Walker as a volunteer commentedWow. I see it now. I tried it and it worked.
I must have completely overlooked that `Restore to` option. I think I blanked that out because I thought it was associated with `Restore from a saved backup` option and had never seen 'How to restore Public Files Directory' mentioned in any documentation.
Thanks for your help.
Comment #6
couturier CreditAttribution: couturier as a volunteer commented