You are here: Database Administration > Backing Up and Restoring Databases > Freeing Storage Space Used by Old Snapshots

Freeing Storage Space Used by Old Snapshots

For every committed transaction, a snapshot storage manager takes a snapshot and stores it in its snapshot archive. Each snapshot is a virtual copy of the database, which is stored in a space-efficient way. Over time, snapshots may consume a large amount of storage space. You can monitor how much space is consumed by snapshots using any conventional file system or disk space monitoring tool.

To avoid running out of storage space in any system that continues to commit transactions, you need to periodically remove snapshots from the snapshot archive. The procedure for removing snapshots is as follows:

  1. Form a snapshot retention policy. You might want an SSM to always keep a certain number of the most recent snapshots or you might want to use only a certain amount of storage for snapshots.
  2. Invoke the nuodbmgr prune snapshots command, which uses your snapshot retention policy to identify the snapshots that can be removed.
  3. Delete or move the identified snapshots.

Since an SSM uses albumA snapshot storage manager uses albums to efficiently manage snapshots. An album refers to a set of snapshots taken during some period of time. Also, an album provides a place to store additional state required to use snapshots.s to manage snapshots, before you remove snapshots, see About Snapshot Storage Managers and Database Options for When SSMs Open New Albums. The database options described there determine when an SSM closes an album and starts storing snapshots in a new album. The settings of these options should reflect the granularity with which you want to remove snapshots. For example, if you want to want to remove snapshots in groups of at least 100 then you would use the default setting of the ‑‑snapshot-min-size option, which specifies that the SSM can close an album only if it contains at least 100 snapshots.

After you have a snapshot retention policy, you can invoke the nuodbmgr prune snapshots command. This command does the following:

It is up to you to delete or move the identified albums.

Snapshot storage managers and snapshots are preview features.

Preview: NuoDB encourages you to use preview features in your development projects. However, the use of preview features in production is not supported.