Hi guys,

I am working on another fresh project :) which is the reason why I want to do everything correct from the beginning --> Always do back ups before installing new modules

The problem I encountered however is that with the "Back Up & Migrate"-module you can´t back up and restore the whole site. So when you back up the site with this module only the databases etc. is backed up, but not the modules or the themes. Do you know any way how to get really everything backed up, so that the site is 100% the same as it was when I made the back up. For example if I do a back up and then install the "token-module" and then restore the site, the token-module is still installed. How do I back it up and restore it, so that the site is in the original state where the token-module has never been installed.

Thanks for your help!

Greets,

TTerm

Comments

VM’s picture

multiple options to do this without doing it via Drupal (I've never used backup migrate module). Use your hosts file manager. Your hosts backup manager. Your FTP software. DRUSH. Host shell, etc.

For example if I do a back up and then install the "token-module" and then restore the site, the token-module is still installed.

The above isn't accurate. if the DB was restored to pre-token installation, then the module is no longer installed. It's simply in your file system waiting to be installed.

Drupal_8_TTerm’s picture

I´m using Filezilla as FTP-software. How would I do a back up in the best case?
Just download all the files that are on the server and then reupload them? Are the databases included there?

VM’s picture

yes. download and reupload though you've chosen the slowest method. I'd tar them on the server then download the archive.
no the database dealt with using your host database tools or drush etc.

Drupal_8_TTerm’s picture

how do I do this with Drush? I don´t know, to me it seems not such a safe way to just download and reupload everything, don´t know

saurabh rawat’s picture

you can use below Drush command

drush @servername.prod archive-dump --destination=/adresstobackupfolder/backups/sitename.prod03082017.tar.gz

peterjlord’s picture

For drush you will need shell access via ssh. It also needs installing http://docs.drush.org/en/7.x/install/ and setting up https://www.deeson.co.uk/labs/drupal-drush-aliases-and-how-use-them

However once set up you'll wonder how you ever managed without it.

BWestOz’s picture

Ugh

I went to put a post in here but the forum mangles some characters so my syntax was corrupted.

On a LAMP install you can backup the drupal directory with cp -rp to preserve ownership info.

You can backup the database with msqldump.

I'll try putting a post in another forum about the problem of displaying certain characters in forum posts.

peterjlord’s picture

That's why you use drush. So you don't have to do all that:)

BWestOz’s picture

Well fair enough but it's only two commands so there's not a lot of difference. Does drush backup both the dir and the db in one command? You can backup most LAMP based CMSs with cp and mysqldump.

Here's an explanation I found anyway.

https://www.drupal.org/docs/7/backing-up-and-migrating-a-site/back-up-yo...

I'm a drupal newbie and no doubt I will become a drush affectionado in time.

cheers :)

Drupal_8_TTerm’s picture

Ok cool! Thank you guys!