Skip to content

Instantly share code, notes, and snippets.

@cyx
Created November 28, 2012 21:24
Show Gist options
  • Save cyx/4164646 to your computer and use it in GitHub Desktop.
Save cyx/4164646 to your computer and use it in GitHub Desktop.
Backups How-to | openredis

Using the backup API

Using the openredis backup API, you can list, download, or restore the latest backup.

The following examples require that use your email and password for each curl call.

Important security note: Make sure you use the SSL endpoint in order to protect your credentials from eavesdropping.

List all your plans

Input:

curl -u email:password https://openredis.com/api/v1/plans

Output:

[
    {
        "url": "redis://node-xxx.openredis.com:10101",
        "id": "100"
    }
]

List all backups for a plan

The following examples assume the ID 100 based on the sample output above.

Input:

curl -u email:password https://openredis.com/api/v1/plans/100/backups

Output:

[
    {
        "url": "https://s3.amazonaws.com/backups.openredis.com/...",
        "filename": "6.dump.rdb.gz",
        "last_modified": "2012-11-24 04:01:24 +0000"
    }
]

In the example above, the filename signifies the day of the week, 0 being Sunday, so 6 means Friday.

Restore your latest hourly backup

At this point, we only allow restoration from the latest hourly backup.

IMPORTANT NOTE: When you restore from an hourly backup, your Redis instance would be shut down temporarily in order to load the RDB backup. The duration of the downtime would depend on the size of your backup.

Input:

curl -u email:password -X POST \
        https://openredis.com/api/v1/plans/100/backups/restore

Output:

Completed in 10.20 seconds.

If you have any suggestions, feature requests, or general feedback, please send them to [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment