README.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. -------------------------------------------------------------------------------
  2. Backup and Migrate 3 for Drupal 7.x
  3. by Ronan Dowling, Gorton Studios - ronan (at) gortonstudios (dot) com
  4. -------------------------------------------------------------------------------
  5. DESCRIPTION:
  6. This module makes the task of backing up your Drupal database, code and uploaded
  7. files and of migrating data from one Drupal install to another easier.
  8. Database backup files are a list of SQL statements which can be executed with a
  9. tool such as phpMyAdmin or the command-line mysql client. File and code
  10. backup files are tarballs which can be restored by extracting them to the
  11. desired directory.
  12. -------------------------------------------------------------------------------
  13. INSTALLATION:
  14. * Put the module in your Drupal modules directory and enable it in
  15. admin/modules.
  16. * Go to admin/people/permissions and grant permission to any roles that need to be
  17. able to backup or restore the database.
  18. * Configure and use the module at admin/config/system/backup_migrate
  19. OPTIONAL:
  20. * Enable token.module to allow token replacement in backup file names.
  21. * To Backup to Amazon S3:
  22. - Download the S3 library from http://undesigned.org.za/2007/10/22/amazon-s3-php-class
  23. and place the file 'S3.php' in the includes directory in this module.
  24. The stable version (0.4.0 – 20th Jul 2009) works best with Backup and Migrate.
  25. LIGHTTPD USERS:
  26. Add the following code to your lighttp.conf to secure your backup directories:
  27. $HTTP["url"] =~ "^/sites/default/files/backup_migrate/" {
  28. url.access-deny = ( "" )
  29. }
  30. You may need to adjust the path to reflect the actual path to the files.
  31. IIS 7 USERS:
  32. Add the following code to your web.config code to secure your backup directories:
  33. <rule name="postinst-redirect" stopProcessing="true">
  34. <match url="sites/default/files/backup_migrate" />
  35. <action type="Rewrite" url=""/>
  36. </rule>
  37. You may need to adjust the path to reflect the actual path to the files.
  38. -------------------------------------------------------------------------------
  39. VERY IMPORTANT SECURITY NOTE:
  40. Backup files may contain sensitive data and by default, are saved to your web
  41. server in a directory normally accessible by the public. This could lead to a
  42. very serious security vulnerability. Backup and Migrate attempts to protect
  43. backup files using a .htaccess file, but this is not guaranteed to work on all
  44. environments (and is guaranteed to fail on web servers that are not apache). You
  45. should test to see if your backup files are publicly accessible, and if in doubt
  46. do not save backups to the server, or use the destinations feature to save to a
  47. folder outside of your webroot.
  48. OTHER WARNINGS:
  49. A failed restore can destroy your database and therefore your entire Drupal
  50. installation. ALWAYS TEST BACKUP FILES ON A TEST ENVIRONMENT FIRST. If in doubt
  51. do not use this module.
  52. This module has only been tested with MySQL and does not work with any other dbms.
  53. If you have experiences with Postgres or any other dbms and are willing to help
  54. test and modify the module to work with it, please contact the developer at
  55. ronan (at) gortonstudios (dot) com.
  56. Make sure your php timeout is set high enough to complete a backup or restore
  57. operation. Larger databases require more time. Also, while the module attempts
  58. to keep memory needs to a minimum, a backup or restore will require
  59. significantly more memory then most Drupal operations.
  60. If your backup file contains the 'sessions' table all other users will be logged
  61. out after you run a restore. To avoid this, exclude the sessions table when
  62. creating your backups. Be aware though that you will need to recreate the
  63. sessions table if you use this backup on an empty database.
  64. Do not change the file extension of backup files or the restore function will be
  65. unable to determine the compression type the file and will not function
  66. correctly.
  67. The module's permissions should only be given to trusted users due to the
  68. inherent security vulnerabilities in allowing people access to a site's database
  69. and/or files backups.
  70. IF A RESTORE FAILS:
  71. Don't panic, the restore file should work with phpMyAdmin's import function, or
  72. with the mysql command line tool. If it does not, then it is likely corrupt; you
  73. may panic now. MAKE SURE THAT THIS MODULE IS NOT YOUR ONLY FORM OF BACKUP.
  74. -------------------------------------------------------------------------------