Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. Executing Drush Commands > Backing up and restoring entire websites (archive...

Backing up and restoring entire websites (archive-dump and archive-restore)

We have done some work on our site and it gets to the point where we start worrying about what would happen if something goes wrong and we lose everything, or if a change in the site will need a rollback that may be tedious. Drush provides a couple of commands to deal with this:

  • archive-dump: This command packs a whole Drupal site including code, files, and database into a single file
  • archive-restore: This command restores code, files, and database into a directory from a previous backup made with archive-dump

For example, let's create a directory out of our Drupal project where we will store our backups and then create one and place it there. Whenever you start to use this command on production environments, it is highly recommended that you copy these backups periodically to a safer machine, out of the server where the site runs.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint