Loading...

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.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation