Service Offerings

Working with the database

Backup

Daily backups of the Drupal database from the last 15 days are always available. To request the historical backup files, create a Support ticket.

Exporting the database

You can manually export the database by using a drush command.

  1. Log in to Task Server through SSH.

  2. Run the following drush command to export the database:

    drush sql-dump > *exported-database-file-name*.sql
    

    In this command, replace the exported-database-file-name text with the name of the file that you want to export.

Importing the database

China Managed Services don’t support importing the database by using a drush command. Therefore, you must use the command line interface (ach-cli) to import the database file.

  1. Log in to Task Server through SSH.

  2. Run the following ach-cli commands to import the database:

    • To import the database with the .sql extension:

      ach-cli sql-import -l <site alias> < *imported-database-file-name*.sql
      
    • To import the database with the .sql.gz extension:

      zcat *imported-database-file-name*.sql.gz  | ach-cli sql-import -l <site alias>
      

    In these commands, replace the imported-database-file-name text with the name of the file that you want to import.