Monthly Archives: July 2016

Restore a Drupal backup

If you try to backup a Drupal site you’ll have an archive with all the stuff you need to restore. Extracting it you’ll find a folder named www in which all the needs are stored: a file named database.sql that is the db dump and a docroot folder with all the files.

At first we have to create a new database and restore the dump in it. After that move the www directory in the webserver dir.

I’m restoring on my test machine so I have many sites in my webroot accessible like this http://mylocaltest/sitename and the standard htaccess must be modified: find the line with RewriteBase / and comment it adding a # at the beginning of the row.

To login go to http://mylocaltest/sitename/user.

There may be permission errors about streaming of files or something like that. To fix them you have to allow your webserver to write in the following dirs:

  • sites/default/files
  • sites/default/files/Privati
  • tmp

If you want you can change them from http://mylocaltest/sitename/admin/config/media/file-system.