drush archive-dump

Backup your code, files, and database into a single file.

Drush Command

drush archive-dump

Arguments

sites : Optional. Site specifications, delimited by commas. Typically, list subdirectory name(s) under /sites.

Aliases

drush ard
drush archive-backup
drush arb

Options

--skip-tables-key : A key in the $skip_tables array. @see example.drushrc.php. Optional.
--structure-tables-key : A key in the $structure_tables array. @see example.drushrc.php. Optional.
--tables-key : A key in the $tables array. Optional.
--skip-tables-list : A comma-separated list of tables to exclude completely. Optional.
--structure-tables-list : A comma-separated list of tables to include for structure, but not data. Optional.
--tables-list : A comma-separated list of tables to transfer. Optional.
--description : Describe the archive contents.
--tags : Add tags to the archive manifest. Delimit multiple by commas.
--destination : The full path and filename in which the archive should be stored. If omitted, it will be saved to the drush-backups directory and a filename will be generated.
--overwrite : Do not fail if the destination file exists; overwrite it instead. Default is --no-overwrite.
--generator : The generator name to store in the MANIFEST file. The default is "Drush archive-dump".
--generatorversion : The generator version number to store in the MANIFEST file. The default is 8.1.8.
--pipe : Only print the destination of the archive. Useful for scripts that don't pass --destination.
--preserve-symlinks : Preserve symbolic links.
--no-core : Exclude Drupal core, so the backup only contains the site specific stuff.
--tar-options : Options passed thru to the tar command.

Examples

Write an archive containing 3 sites in it.

drush archive-dump default,example.com,foo.com
Save archive containing all sites in a multi-site.
drush archive-dump @sites
Save archive to custom location.
drush archive-dump default --destination=/backups/mysite.tar
Omits any .git directories found in the tree as well as sites/default/files.
drush archive-dump --tar-options="--exclude=.git --exclude=sites/default/files"
Placeholder %files is replaced with the real path for the current site, and that path is excluded.
drush archive-dump --tar-options="--exclude=%files"