Knowledge Base/Engine Yard Cloud Documentation/Manage your Environment

Manage Snapshots

Keri Meredith
posted this on July 25, 2013 01:54 PM

Updated: July 26th, 2013

This feature provides the tools you need to review and refine your snapshot retention policy. Snapshot management allows you to set the snapshot policy at the account level and at the environment level; you can also delete unneeded snapshots from the account or environment levels.

Snapshots are an important part of a high availability strategy but keeping lots of old snapshots around can add up in usage charges. If you find that you have a number of snapshots that you no longer need, you can use the snapshot management / delete function to clear them out and reduce your monthly costs.

Get started with snapshot retention policy on Engine Yard

Prerequisites

It's important for you to understand these aspects of Engine Yard snapshot retention policy:

  • The configuration setting for the number of snapshots applies to each instance in an environment.
  • The default snapshot retention period is set to 90 days.
  • Engine Yard deletes any snapshot that is older than the retention period.
  • You can change the snapshot retention period at the account level as well as the environment level.
  • The account level snapshot retention policy is used only for "orphaned" snapshots, which is somewhat rare. It is not an inherited retention setting to be used at the environment level.
  • Seasonal (periodically dormant) environments should use a retention setting that keeps at least one snapshot between seasons (for example use the 365 day or the "forever" setting).

Important: You should verify the snapshot retention period for your seasonal application environments.

Manage snapshots

You can manage snapshots at the account level and the environment level.

To manage snapshot retention policy at the account level

  1. In Engine Yard, click Tools > Snapshots.

    The Snapshot Management page appears, showing the snapshot retention period for the account level (used for "orphaned" snapshots only).

    All snapshots across all the account's environments appear in the snapshot list.

  2. Continue with Step 4 below.

To manage snapshot retention policy at the environment level

Important: We recommend testing in a staging environment before applying changes in a production environment.

  1. In Engine Yard, click Tools > Dashboard.
  2. Select an environment by clicking the environment name.
  3. On the Environment page, click Snapshots.

    snap_view_manage.png

    The Snapshot Management page appears, showing the snapshot retention period for the selected environment.

    All snapshots specific to this environment appear in the snapshot list.

  4. (Optional) Change the snapshot retention period if you need to decrease or increase the amount of time (in days) that snapshots are kept for the environment.

    snap_management.png

  5. Click Update snapshot settings.

    From this point forward, Engine Yard will delete snapshots after the specified number of days has passed for all snapshots related to any instances associated with the environment.

  6. (Optional) If you need to delete snapshots for the environment, select the Destroy checkbox for those snapshots.

    snap_check_destroy.png

  7. Click snap_delete_button.png

    Engine Yard immediately begins deleting the selected snapshots and displays [destroying] at the end of the snapshot description.

    snap_destroying_inprog.png

Configure snapshot retention policy

When you set up your environment, you specify the number of snapshots and the number of days to keep the snapshots.

Important: We recommend testing in a staging environment before applying changes in a production environment.

To configure snapshots in your environment

  1. In Engine Yard, click Tools > Dashboard.
  2. Select an environment by clicking the environment name.
  3. On the Environment page, click Edit Environment.

    enviro_edit.png

    The Edit Environment page appears.

  4. Update the snapshot retention policy as needed:

    enviro_snap_settings.png

    • Number of snapshots to keep, per instance.

      Note: This applies to each instance in an environment. For example, if you have 5 instances and set this number of snapshots to 10, then your environment will accumulate 5x10 snapshots.

    • Snapshot retention period in days, for this environment.

      Note: This defaults to 90 days for environments. (The policy is not inherited from the account level.)

  5. Click Update Environment to save the new snapshot settings.

Note: You can also configure these settings when you create a new environment.

Verify snapshot retention policy

Here are some ways that you can verify the snapshot retention policy for your environment.

To verify snapshot retention policy

  1. You can view the account-wide setting for snapshot retention period (used for "orphaned" snapshots only) using Tools > Snapshots.
  2. You can view the environment-specific setting for number of snapshots (per instance) and retention period (per environment) on the Edit Environment page.
  3. You can view the retention period, in days, on the Snapshot Management page.
  4. You can view the date and time a snapshot was created (and therefore, when you can expect it to be deleted), on the Snapshot Management page.
  5. Once you have deleted snapshots, you can refresh the Snapshot Management page to see the remaining snapshots.

Note: Deleting an instance or an environment does not make the related snapshots go away; Engine Yard deletes snapshots based on the set retention period (default 90 days).

FAQs

You might have these questions about the snapshot retention policy feature.

Why do I have WAY more snapshots than I expected (for example, I have 5 instances, yet have more than 500 (5x100) snapshots)?

This can happen if you cycle your instances often. Remember that the number of snapshots is per instance. So if you have 5 running instances and 10 deleted instances, you can have (5+10)x100 snapshots associated with that environment.

Why do I still have snapshots even though the related instance and environment have been deleted?

Snapshots are kept even after an instance is stopped, and after an environment has been deleted. This is a precaution, in case you need the snapshots to rebuild an instance or to build up a replacement environment. The default is to keep snapshots 90 days.

Why am I being charged for snapshots even though the environment is long gone?

See above answer. The snapshot retention policy should be set based on your app's needs. If you have old snapshots that you no longer need, see Manage snapshots in an environment for information on deleting unused snapshots (even those no longer associated with a particular environment).

Why is there no name in the Environment column associated with snapshots in the list of snapshots for this environment?

Snapshots that appear in your snapshot management list without an associated environment name are probably abandoned snapshots from a deleted environment. If you no longer need them, it is OK to delete these snapshots. Or, if you do nothing, Engine Yard will delete them when the snapshot retention period (default 90 days) has passed.

Can I set a retention period per instance? or per app?

No; retention period (in days) is set per environment. The account-level default is 90 days.

Can I keep more snapshots for my database (for example, 20 for database and 5 for app master)?

No; the number of snapshots setting is per instance, across the environment. Remember that snapshots are generally small and incremental and are relatively low-cost. Use backups to ensure data integrity.

What's the difference between a backup and a snapshot again?

See environment options.

More information

This table provides other resources related to snapshot retention policy.

For more information about...See...
Creating a new environment Create an Environment
Adding instances to an environment Add Instances to an Environment
Taking snapshots Take Snapshots

If you have feedback or questions about this page, add a comment below. If you need help, submit a ticket with Engine Yard Support.

 

Comments

User photo
Petteri Räty
experq

This doc says: Note: Deleting an instance or an environment does not make the related snapshots go away; Engine Yard deletes snapshots based on the set retention period (default 90 days).

However, when trying to delete an environment you get a dialog saying:

"Are you sure? This will delete all volumes and snapshots associated with this xyz environment. There is no undo. This may take a minute so be patient"

August 01, 2013 02:32 AM
User photo
Keri Meredith
Engine Yard Inc.

Hi Petteri, Thanks for this update. We recently changed the snapshot management logic (with this recent feature GA). Looks like we need to update that dialog message to match. kjm

[Triage-6502]

August 01, 2013 10:05 AM