cohesiondx8 / drupal-archive
Console helper to archive/restore drupal websites.
Installs: 822
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/cohesiondx8/drupal-archive
Requires
- symfony/console: ^4.1
- symfony/process: ^4.1
README
Since drush 9.x does not support drush archive-dump and drush archive-restore, we decided to create this little tool which does pretty much the same thing in a more primitive way.
There are 2 commands: drupal-archive cda:dump && drupal-archive cda:restore with optional parameters --use-drush in case you have drush <= 8.1.17 and you want to use the native drush commands.
Installing
You will need composer installed with php >= 7.1 and mysql client tools (mysqladmin) on your machine.
It is best to install the package globally with composer:
composer global require cohesiondx8/drupal-archive
Usage
Archiving a drupal website
drupal-client cda:dump <source> <destination> [--overwrite] [--use-drush]
sourceis your drupal website docroot (usually/var/www/html).destinationis the created target archive location.--overwriteis whether you want to overwritte your archive.--use-drushif you have drush <= 8.1.17 installed then you can use this parameter to calldrush archive-dumpinternally.
Example:
drupal-client cda:dump /var/www/html/web /tmp/backup.tar --overwrite --use-drush -vvv
Restoring a drupal website
drupal-client cda:restore <source> <destination> [--db-url=mysql_url] [--overwrite] [--use-drush]
sourceis the archive previously created withcda:dumpdestinationis the target directory where your drupal website will be extracted.--overwriteis whether you want to overwritte your archive.--use-drushif you have drush <= 8.1.17 installed then you can use this parameter to calldrush archive-dumpinternally.
Example:
drupal-client cda:restore /tmp/backup.tar /var/www/html/web-new --db-url=mysql://username:password@localhost:3306/drupal --overwrite -vvv