# Summary
Back up and restore your Drupal MySQL database, code, and files or migrate a site between environments. However, beware that the alpha version as of December 2016 still has an open critical issue that makes the module essentially non-functional. See Comment #31 for details.
# Project URL
https://www.drupal.org/project/backup_migrate
# Where is the code?
A partially functional rewrite is available in the 8.x-4.x-dev branch
(The non-functional 8.x-3.x-dev branch has been abandoned, as a straight port proved too cumbersome)
# Estimated completion date
The 4.x rewrite is in a very early stage. A 4.0 release date has not been determined. Another simpler backup module is under development for 8.x in November 2015, Backup Database.
# Dependencies
None
# Who's doing the port?
Work is being done to rewrite the module from the ground up by ronan. Volunteers are welcome but 'does not work' or 'feature missing' tickets are a bit premature.
# What help do they need?
Developers who are familiar with PHP OOP best practices and test writing using PHPUnit would be helpful to continue the rewrite. On December 17, 2016, Damien McKenna requested a co-maintainer to help with the current critical issue with this module.
# D8 roadmap
No meta issue
https://www.drupal.org/project/issues/backup_migrate?status=All&version=8.x
# Background and reference information
As of December 16, 2016, according to Comment #31, the green 8.x-4.0-alpha1 version (also dev) still has an open critical issue that leads to an irreversibly corrupted database after backup and restoring. The current export process doesn't take UTF8 into consideration, which leads to a conversion of all non-ascii characters into ?. If a user is trusting the alpha version and restoring from a backup created by this version, he will probably corrupt his database.
Comments
Comment #2
Liu Xin CreditAttribution: Liu Xin commentedThe version can't be use ,because if you install this module, The entire site will crash, And you must remove all the files from the modules folder manualy!So don't try it after the author renew the version
Comment #3
Les Lim CreditAttribution: Les Lim commentedComment #4
Jorge82 CreditAttribution: Jorge82 commentedI have tested "8.x-3.x-dev" in Drupal 8 rc3.
backup and migrate 8.x-.3x-dev
However, happens the same to @Xin-liu. The entire site crashed.
I had to enter in my folder server and deleted the folder of the module in the "general modules folder"
Later, it works correctly again.
At the moment, we have to do manual backups of the schema and the folders of drupal :(
Regards!
Comment #5
swim CreditAttribution: swim commented@Jorge82
I wrote a very simple integration for the mysqldump-php library. Might help - https://www.drupal.org/project/backup_db. Please note this only provides database export functionality.
Comment #6
Jorge82 CreditAttribution: Jorge82 commented@swim
It is a good help.
I understand that only makes the "backup" for the sql table. Not for the "html/drupal"folder. Isn't it?
Thank you for the help!
Regards!
Comment #7
couturier CreditAttribution: couturier as a volunteer commentedI've updated the issue to reflect that work no longer appears to be progressing with moving this module to D8. Developers who cannot back up D8 sites using the command line should try the currently maintained module for D8 mentioned by swim, Backup Database.
Comment #8
couturier CreditAttribution: couturier as a volunteer commentedComment #9
miniwebs2 CreditAttribution: miniwebs2 commentedUsed in Drupal 8.0.0 - crashed the site.
Removed the entire module folder - site returned to normal.
Comment #10
Dave Reid CreditAttribution: Dave Reid commentedMore accurate status, the port needs work.
Comment #11
couturier CreditAttribution: couturier as a volunteer commentedThank you for the input, Dave Reid. I have adjusted the summary to reflect that this module is intended to be eventually updated for D8 despite the fact that 8.x dev is breaking sites as of the D8 official release in November 2015:
Early adopters of D8 may want to use a similar module, Backup Database, which is currently maintained and usable for D8.
Comment #12
ronan CreditAttribution: ronan commentedI have created a new release: 8.x-4.x-dev (https://www.drupal.org/node/2629226) which represents the latest work on this port. I am undertaking a total rewrite of the module. The main functionality will be broken out into a separate library (https://github.com/backupmigrate/backup_migrate_core) with the Drupal module acting as a wrapper.
Work on this port has stalled out in the last few months due to lack of time but I'll be attempting to commit more time to it in the next month or so.
In the mean time 8.x-4.x is marginally functional. There are a lot of pieces not yet ported but database exporting sort of works. I'm really posting it more to show that SOME progress has been made. Hopefully the next month will bring a real dev release.
Sorry I let the ball drop so hard on this everyone! I intend to recover the fumble, punch it into the endzone and continue to torture this sports metaphor until it gives up.
Comment #13
mgifford CreditAttribution: mgifford at OpenConcept Consulting Inc. commentedComment #14
greta_drupal CreditAttribution: greta_drupal as a volunteer commented@ronan,
This is a fantastic module and top of the list for many/most of us. I look forward to a D8 version. Thank you so much for your all your contributions. Do you need sponsorship or have a tip jar?
Tyme
Comment #15
webchick CreditAttribution: webchick at Acquia commentedThis is probably major given the impact on site builders.
Also, I wish Drupal.org had a "Like" button for the last sentence of #12. That literally made me LOL, ronan, thanks. :D
Comment #16
NickWilde CreditAttribution: NickWilde commented@Ronan: any updates? (if it is could really use someone working on x functionality I might be interested... I loved B&M for D7 and am missing it)
Comment #17
couturier CreditAttribution: couturier as a volunteer commented@nickwilde remember you can also use Backup Database which performs a similar function and is currently functional for D8. It works fine for simple sites and is in many cases more performant.
Comment #18
Q2U CreditAttribution: Q2U commentedGet up, rub some dirt on it, and get back in the game ronan!
And thank you for all of your terrific work on BaM.
Comment #19
iampuma CreditAttribution: iampuma commentedAny chance in having the `drush bb` and such support in soon? Dev version is currently working fine.
Comment #20
Gerhard Roth CreditAttribution: Gerhard Roth commentedI installed the new alpha1 version today together with D8.1.1. It needs a backup source but the list is empty. So no backup is possible.
Comment #21
couturier CreditAttribution: couturier as a volunteer commentedOn May 17, 2016, I installed Backup and Migrate 8.x-4.0-alpha1 on a Drupal 8.1.1 installation and achieved a backup size similar to what I receive from the Drupal 7 Backup and Migrate version on a similar site. I have no easy way to check the contents of the backup, but I am assuming that it is functioning for me.
I'd previously commented that the Backup Database module is a good alternative, but that was before I realized that this module depends on Composer Manager which is soon to be deprecated and requires command line access. The special feature of Backup and Migrate is that it facilitates backups without command line access, so I do think we should continue to go forward with polishing this module for D8.
Bojan Zivanovic commented on May 3, 2016, at this Commerce blog post that a production-ready version of Commerce will be available, "Somewhere in May, depending on payments and translation/revisioning bugs we encounter in the upcoming two weeks." A number of Drupal developers I know are holding back D8 projects based on Commerce, so I think within weeks we could see an upsurge in interest in Backup and Migrate from site developers who need help with D8 backups.
Comment #22
bmunslow CreditAttribution: bmunslow at SOCIETAT PORTAL DE LLEIDA S.L commentedWhile Backup and Migrate is ready, I use the amazing Drupal Console for quick and easy database dumps / restores, it's as simple as:
$ drupal database:dump [arguments] [options]Ref: https://hechoendrupal.gitbooks.io/drupal-console/content/en/commands/database-dump.html
Comment #23
colan CreditAttribution: colan at Colan Schwartz Consulting commentedI opened an issue for that at #2779103: Stop relying on deprecated Composer Manager.
What do you mean by command-line access? Do you mean that it's not possible to export the DB from the Web UI without using the command line, or that it uses the command line in the back-end to do the work? The former would definitely be a problem, but not so much for the latter.
Comment #24
Jeff Burnz CreditAttribution: Jeff Burnz commentedA heap of my sites use Node Squirrel, for that reason I really want this module to be ported to D8 so we have very easy, reliable and automated backups for the masses (like me).
Comment #25
couturier CreditAttribution: couturier as a volunteer commented@colan
It's been a while since I've looked at it, but I believe it was the former unless it has since been updated to allow backups from the UI since I last checked. Like @Jeff Burnz we need something easy for the masses. I've been using this current Backup and Migrate module for D8 without any problems.
Comment #26
andypost CreditAttribution: andypost as a volunteer and at Skilld commentedWould be great to update install instructions for current state of composer integration
Comment #27
couturier CreditAttribution: couturier as a volunteer commented@andypost This module does not currently rely on Composer Manager. I have been using Backup and Migrate version 8.x-4.0-alpha1 as my only added module on a simple Drupal 8 site, and it works great.
Comment #28
DamienMcKenna CreditAttribution: DamienMcKenna at Mediacurrent commentedI confirmed that the current 8.x-4.x branch doesn't use Composer Manager so closed #2779103: Stop relying on deprecated Composer Manager.
Comment #29
colan CreditAttribution: colan at Colan Schwartz Consulting commentedThat's a Backup Database issue, not a Backup & Migrate one.
Comment #30
DamienMcKenna CreditAttribution: DamienMcKenna at Mediacurrent commentedDoh. Sorry.
Comment #31
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedThe currently promoted green 8.x-4.0-alpha1 version (also dev) has an open critical issue since almost half an year, that leads to a irreversibly corrupted database after backup and restoring. The current export process doesn't take UTF8 into consideration, which leads to a conversion of all non-ascii characters into
?.Once an user is trusting the alpha status, taking an backup and restoring it, he will probably corrupt his database. As backup_migrate is especially popular for shared hosting and tendentially more unexperienced users, without possibility or knowledge about using terminal commands or other backup strategies, it's an even more critical issue.
Comment #32
DamienMcKenna CreditAttribution: DamienMcKenna at Mediacurrent commentedMaybe the module needs an extra comaintainer? Anyone have some time to help out with it?
Comment #33
couturier CreditAttribution: couturier as a volunteer commentedWow! Thanks for the warning, @szeidler. I had been assuming this one was working but had never tested it. So, this means I need to switch to the Backup Database module after all for now. Thank you! Yes, @DamienMcKenna, it would be nice to continue work with this module because the alternate Backup Database is designed for simple sites and doesn't have all the functionality of Backup and Migrate.
Comment #34
couturier CreditAttribution: couturier as a volunteer commentedComment #35
colan CreditAttribution: colan at Colan Schwartz Consulting commentedOr we could just add the missing functionality to Backup Database and deprecate Backup and Migrate (for D8).
Comment #36
Olafski CreditAttribution: Olafski at buerobackbord commentedI don't agree regarding Backup Database as an alternative: The installation of the module requires Composer which on some shared hostings is difficult to install, and not everyone is familiar to use it. It should be as simple as possible to make database backups because they are so important. So, I hope Backup and Migrate will not get deprecated but find a maintainer.
Comment #37
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedI agree that Composer is hard for beginners. But I don't see the argument with Shared hosting. Ideally Composer shouldn't run on the production server at all. Or at the very maximum only for
composer installusing the composer.lock file.Nothing prevents shared hosting users from using composer locally and pushing the vendor files and modules via git (if available), rsync or ftp to the production server. It's not a optimal workflow, but it would work.
Coming back to the topic: Also backup_migrate will at some point depend on Composer. It's already using a library approach (hosted on github), but is currently built-in in the official alpha release and repository. But I'm pretty sure it will switch to a composer-based workflow once there is progress on the module development again.
Comment #38
Olafski CreditAttribution: Olafski at buerobackbord commentedYou're right, using Composer locally might be an acceptable workaround for many users, but as you say, it's hard for beginners. (Off topic: I'd like to see a Composer managing tool in Drupal itself then. Don't know though if that is even possible.)
However, if Backup and Migrate will soon depend on Composer as well, I retract my Composer related objection to Backup Database. Can't judge the quality of the two modules though.
Comment #39
Jeff Burnz CreditAttribution: Jeff Burnz commentedCan't see that, this module is dead. No updates for 7 or 8 months, D8 now 1 year old. Intentions are all good, but the lack of progress or communication is quite profound given the sheer popularity of this module.
Move ahead please, I personally despise Composer, and you will be killing any hope of it ever becoming a popular module, but we need working software, so please, add the features.
It's pretty easy to install and use, the problems are when things go wrong, which is quite often. People shouldn't misunderstand the push back against Composer as purely one of beginners vs experienced, I am very experienced and I hate Composer will all my soul.