---
title: "Working with the database"
date: "2024-02-14T06:18:38+00:00"
summary: "Learn how to backup, export, and import your Drupal database with ease. Discover step-by-step instructions for database management, including daily backups and command-line operations for developers and site administrators."
image:
type: "page"
url: "/service-offerings/working-database"
id: "e10838a8-cb5b-4008-a2b3-e40ea0657a50"
---

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](/service-offerings/support#contact-acquia-support).

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.