GithubHelp home page GithubHelp logo

cellear / backup_migrate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from backdrop-contrib/backup_migrate

0.0 0.0 0.0 905 KB

Port of the Drupal backup_migrate module to Backdrop

License: GNU General Public License v2.0

JavaScript 1.63% PHP 98.01% CSS 0.35%

backup_migrate's Introduction

Backup Migrate for Backdrop CMS

This module makes the task of backing up your Backdrop database and migrating data from one Backdrop install to another easier. It provides a function to backup the entire database to file or download, and to restore from a previous backup. You can also schedule the backup operation. Compression of backup files is also supported.

There are options to exclude the data from certain tables (such as cache or search index tables) to increase efficiency by ignoring data that does not need to be backed up or migrated.

The backup files are a list of SQL statements which can be executed with a tool such as phpMyAdmin or the command-line mysql client.

PHP 8 NOTE: Due to changes in Backdrop CMS 1.19 and newer to be PHP 8 compatible, the backup_migrate module must be updated when you update your Backdrop installation. See Issue #64 for more details.

Installation

  • Install this module using the official Backdrop CMS instructions at https://backdropcms.org/guide/modules
  • Put the module in your Backdrop modules directory and enable it in admin/modules.
  • Go to admin/people/permissions and grant permission to any roles that need to be able to backup or restore the database.
  • Configure and use the module at admin/config/system/backup_migrate
  • Visit the configuration page under Administration > Configuration > Category > Backup Migrate (admin/config/category/backup_migrate) and enter the required information.
  • With the token.module now in Backdrop core, your site name from: admin/config/system/site-information will automatically be the backup file name. Other tokens like [site:url] may also be used.

OPTIONAL:

  • To backup to Amazon S3:
  • Nodesquirrel has been removed as the service no longer exists.

LIGHTTPD USERS: Add the following code to your lighttp.conf to secure your backup directories:

$HTTP["url"] =~ "^/sites/default/files/backup_migrate/" {
     url.access-deny = ( "" )
}

You may need to adjust the path to reflect the actual path to the files.


VERY IMPORTANT SECURITY NOTE: Backup files may contain sensitive data and by default, are saved to your web server in a directory normally accessible by the public. This could lead to a very serious security vulnerability. Backup and Migrate attempts to protect backup files using a .htaccess file, but this is not guaranteed to work on all environments (and is guaranteed to fail on web servers that are not apache). You should test to see if your backup files are publicly accessible, and if in doubt do not save backups to the server, or use the destinations feature to save to a folder outside of your webroot.

OTHER WARNINGS: A failed restore can destroy your database and therefore your entire Backdrop installation. ALWAYS TEST BACKUP FILES ON A TEST ENVIRONMENT FIRST. If in doubt do not use this module.

This module has only been tested with MySQL and does not work with any other dbms.

Make sure your php timeout is set high enough to complete a backup or restore operation. Larger databases require more time. Also, while the module attempts to keep memory needs to a minimum, a backup or restore will require significantly more memory than most Backdrop operations.

If your backup file contains the 'sessions' table all other users will be logged out after you run a restore. To avoid this, exclude the sessions table when creating your backups. Be aware though that you will need to recreate the sessions table if you use this backup on an empty database.

Do not change the file extension of backup files, or the restore function will be unable to determine the compression type the file and will not function correctly.

IF A RESTORE FAILS: Don't panic, the restore file should work with phpMyAdmin's import function, or with the mysql command line tool. If it does not, then it is likely corrupt; you may panic now. MAKE SURE THAT THIS MODULE IS NOT YOUR ONLY FORM OF BACKUP.


Wiki

The WIKI pages of this module contain some tips and tricks that may help people troubleshoot configuration issues.

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

Current Maintainers

Credits

This module was originally written for Drupal by

backup_migrate's People

Contributors

quackers8me avatar argiepiano avatar larsdesigns avatar graham-72 avatar herbdool avatar zlyware avatar cellear avatar radcliffe avatar dgorton avatar sillygwailo avatar robertgarrigos avatar sbordage avatar laryn avatar mbomb007 avatar opi avatar quicksketch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.