drush 备份/恢复drupal 站点

备份: drush arb 或者 drush ard

在站点根目录运行 drush arb --destination=../20160829.domain.tar 可以将源码和 sql 文件备份到上一层目录中.

转到上一层目录, 删掉站点目录, centminmod 中 为 public.

cd ..

rm –rf public

恢复站点: drush arr

drush arr 20160829.domain.tar

image

 

MANIFEST.ini 内容如下:

[Global]
datestamp = "1472431236"
formatversion = "1.0"
generator = "Drush archive-dump"
generatorversion = "8.0.2"
archiveformat = "platform"

[default]
docroot = "/home/nginx/domains/thatk.com/public"
sitedir = "sites/default"
files-public = "sites/default/files"
files-private = "sites/default/private"
database-default-file = "thatk_hi.sql"
database-default-driver = "mysql"