evil0o / dgb Goto Github PK
View Code? Open in Web Editor NEWThis project forked from scor/dgb
Drupal Git Backup (dgb) script for backing up Drupal sites with Git and Drush
This project forked from scor/dgb
Drupal Git Backup (dgb) script for backing up Drupal sites with Git and Drush
Drupal Git Backup (DGB) ======================= DGB is a Drush command to easily maintain a full backup a Drupal code base and all its sites, keeping Drupal files and sites databases together in sync in the same repository. It supports multi site setups and will dump each site database as a version control friendly SQL file. This command leverages git as a powerful (decentralized) version control system to store all websites' data efficiently. This Drush command is still at an experimental state so use with caution. Please give any feedback or file bugs at http://github.com/scor/dgb DGB requires Drush <http://drupal.org/project/drush> and works for any version of Drupal 5, 6 and 7. Installation ============ Install dgb like any other Drush command. See Drush readme.txt file. The typical directory structure dgb was designed for is the following: -- dgb_instance --> drupal --> index.php --> sites --> example1.com --> example2.com --> databases --> example1.com.sql --> example2.com.sql --> .git (dgb git repository) 1. create the dgb_instance folder somewhere on your server (the name does not matter). Make sure it's outside the web public directory. 2. place your drupal code base in the dbg_instance directory, e.g. in a drupal directory. 3. create the 'databases' folder (that is the default dump director that dgb expect, you can change that in drushrc.php, see below). 6. initialize the git repository in the dgb_instance folder by running git init. You might want to create a .gitignore file to ignore certains files, for example .svn if you version your files with svn. 7. from the DRUPAL_ROOT directory, type drush dgb-backup to see if dgb was installed successfully. This will do the initial backup of your dgb_instance, this initial backup might take a while depending on the number of sites you have and their size. 8. setup a cron job to run the backup every day or so, e.g. to run dgb every day at 11am: 00 11 * * * cd /var/sites/dgb_instance/drupal; /usr/local/bin/drush dgb-backup (adapt /usr/local/bin/drush to wherever your drush is located on your server) 9. The following steps are optional. They allow to customize the names of the directories you want to use etc. copy example-dgb.drushrc.php in each site settings directory (.e.g sites/default/), rename it to drushrc.php and check its content. Its default settings should works for most configurations. Commands ======== dgb ships with several commands: - dgb-dump: Dumps all the databases of a Drupal installation. Alternative to the core sql-dump command, with support for table name expansion and ] validation. - dgb-commit: Commits Drupal installation directory including the files directory of all sites, as well as the SQL dumps directory if they are located in the same master backup directory (typically one level up DRUPAL_ROOT). - dgb-usage: Displays some information on the current size of the repository and the Drupal installation. - dgb-backup: Wrapper command to dump, commit and display the size of the Drupal installation and repository Author ====== Stéphane "scor" Corlosquet <[email protected]> References ========== This drush command uses a similar approach to the one used in dbscripts <http://drupal.org/project/dbscripts> except it is fully integrated in drush as opposed to using custom bash scripts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.