Is there Drush command that can backup whole multisite platform:

  • database dump of each site
  • code of each site
  • backup of sites/all or complete core with sites/all
  • and all that in just ONE tar.gz

There is a archive-dump command which can backup whole platform code and database, but it does that for each site, and omitting other sites from its archive. And that is a problem because if you want to use that backup, and let's say you have 3 sites in platform, you would have to untar 3 backups of each site, and then merge those so your /sites folder has all three sites there, instead only one per archive.

Second, less annoying problem with that command is, if you provide it argument @sites, it will try to backup default site as well, which is not used on Aegir.

up vote 2 down vote accepted

You can try drush archive-dump default,example.com,foo.com command to archive the DB and codebase. If it is not possibel through it, then you can create a shell script, which creates backup of the codebase and database.

  • Thanks, but I already said above that archive-dump doesn't do the job, and explained why. It makes backup of particular site and core, omitting all other sites from /sites – milovan Mar 4 '16 at 16:29
  • I just tried with drush 8 and it creates ONE tar archive containing the files from the specified sites ... and the sql dumps. – Herman van Rink Mar 7 '16 at 8:02
  • First I thought it might be the way how it saves in Drupal 7 (unlike you mentioned as single tar in D8), but it turned out to be that if you just pas argument @sites, it will make for each site. But if you pass list of sites without default, then it will again save two tars. Only if you pass exactly like you wrote, with default, it works. On Aegir default is not used but I can put there commented out settings.php (actuall default.settings.php copied as settings.php) and it works. Many thanks! – milovan Mar 7 '16 at 15:15

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.