Drupal Import Db Ftom Backup

[Solved] Drupal Import Db Ftom Backup | Php Frameworks Drupal - Code Explorer | yomemimo.com
Question : Drupal export db to backup

Answered by : al-pinto

ddev ssh
 
drush sql-dump --extra-dump=--no-tablespaces | gzip > backup/db-dump.<project-name>.sql.$(date +%Y-%m-%d-%H.%M.%S).gz
 
exit

Source : https://my.ciesin.columbia.edu/wiki/display/cit/Guidelines+for+Backing+up+and+Switching+or+Updating+Branches | Last Update : Wed, 16 Mar 22

Question : Drupal import db ftom backup

Answered by : al-pinto

ddev ssh
drush sql-drop
 
Copy the database export from other-developer/git/alpha/beta/prod into the backup directory (to keep it gitignored)
  
gunzip -c backup/<name-of-compressed-database-backup-file.gz> | drush sqlc
    NOTE:   This may take a while because we are importing while decompressing on the fly.
   
exit

Source : https://my.ciesin.columbia.edu/wiki/display/cit/Guidelines+for+Backing+up+and+Switching+or+Updating+Branches | Last Update : Wed, 16 Mar 22

Answers related to drupal import db ftom backup

Code Explorer Popular Question For Php Frameworks Drupal