2

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.

1 Answer 1

3

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.

3
  • 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
    Commented Mar 4, 2016 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. Commented Mar 7, 2016 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
    Commented Mar 7, 2016 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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