Information for: DEVELOPERS   PARTNERS

Taking backups

A Cloud Platform application has three principal parts: code, databases, and files. There are several types of backups available on Cloud Platform:

For information about backups in Site Factory, see Backing up sites.

Automated database backups

Daily backups from the last three days are always available. You can take more backups at any time, for example, for critical stages of development. You should also periodically check to ensure that backups complete as expected and test if you can restore websites from a backup copy.

Cloud Platform creates daily backups of all databases in all environments and keeps them for three days. These backups are listed as Daily on the Databases page in the Cloud Platform user interface. These daily backups are required and can’t be disabled.

On-demand database backups

You can take on-demand backups of any database at any time in the Cloud Platform interface on any of the following pages:

These backups are listed as User backups on the Databases page in the Cloud Platform user interface. Cloud Platform keeps your on-demand backups until you delete them. Your backup copies count against the storage space limit associated with your subscription.

Taking a database backup on an application’s Environments page

  1. In the Cloud Platform user interface, select your application.

  2. On the card for the environment you want to back up, select the Back up databases icon.

    Backing up a database from the Environments page

  3. In the list of databases, do one of the following:

    • To take backup for one or more specific databases, select the check boxes for the databases.
    • To take backup for all databases, select All.
  4. Select Continue.

  5. In the confirmation dialog box, select Back up.

Taking a database backup on an environment’s Overview page

  1. In the Cloud Platform user interface, select your application and environment.

    Backing up from the Overview page

  2. In the Databases card, select Back up.

  3. In the list of databases, do one of the following:

    • To take backup for one or more specific databases, select the check boxes for the databases.
    • To take backup for all databases, select All.
  4. Select Continue.

  5. In the confirmation dialog box, select Back up.

Taking a database backup on the Databases page

  1. In the Cloud Platform user interface, select your application and environment.

  2. In the left navigation pane, select Databases.

  3. Find the database you want to back up and select the corresponding Back up option.

    Back up a database

  4. In the Back up a databases dialog box, select Back up.

    The backup process may take a few minutes.

  5. To view the backup you created, select View all backups.

Downloading, restoring, or deleting backups

On the Databases page in the Cloud Platform interface, you can download, restore, or delete (remove) backups.

  1. On the Databases page, locate the database you want to manage.

    Note

    For information about determining the database name for a website hosted by Site Factory, see Website metadata.

  2. Select View all backups for the database.

    On-demand backups are labeled User, while automated backups are labeled Daily.

    • To download a database backup, select Download.
    • To restore a database backup, select Restore.
    • To delete a database backup, select Remove.

Downloading backups from the command line

You can also download any of your database backups using the command line. Using Acquia CLI functionality, you can find the backup you are looking for with:

acli api:environments:database-backup-list

You can then download it with:

acli api:environments:database-backup-download

For more information, see Acquia CLI commands.

Code backups

Your code is maintained in a version control repository managed by Acquia. Each time you use the Cloud Platform user interface to click-and-drag code from an environment running either master or a branch, a new tag will be created in the version control system. You can revert to an earlier tag at any time in any of your environments.

File backups

Your uploaded files are kept separate from your Drupal codebase and database, using a symbolic link to your application’s /files directory. The Git version control system can manage text files full of code, but is less well suited for managing large collections of user-uploaded objects, such as images, videos, or file attachments.

Cloud Platform makes internal disaster recovery snapshots of your files, but these are not available for subscribers for normal backup purposes. If you want to back up your uploaded files, you can either do so manually from the command line or create a cron task to make backups on a regular schedule.

For more information, see Working with files and Backing up your Drupal file system.

Custom full site backups

You can back up your whole application on an environment from the command line, using Drush. The drush archive-dump command creates a complete archive file of your application.

Important

Running this command on a large website (with large numbers of files, large databases, or volumes with a small files area) can lead to a full disk, which will cause the script to hang and will cause a website outage.

The drush archive-dump command is incompatible with Drush 9.

For example, to back up the Prod environment of an application named example1:

drush @example1.prod archive-dump

By default, the backup file is saved to the drush-backups folder. Use the --destination option to specify the full path and file name in which the archive should be stored.

For more information, see About Drush on Cloud Platform and the Drush Commands reference.