Before RIPE Updater overwrites or deletes any object in the RIPE database, it fetches the current object and saves it as a JSON file in S3. This happens unconditionally — even if the subsequent RIPE operation fails — so you always have a point-in-time snapshot of what was in RIPE DB before any change. Backups are the primary recovery path if a prefix is removed from RIPE DB and needs to be restored manually.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jalmargyyk/ripe-updater/llms.txt
Use this file to discover all available pages before exploring further.
Enabling S3 backups
SetS3_BACKUP=yes along with the four connection variables. Without S3_BACKUP=yes, the feature is disabled and no objects are saved.
| Variable | Description |
|---|---|
S3_BACKUP | Set to yes to enable. Default: no |
S3_ENDPOINT_URL | Full URL of your S3 endpoint (e.g. https://s3.example.com) |
S3_ACCESS_KEY | Access key for your S3 storage |
S3_SECRET_ACCESS_KEY | Secret access key for your S3 storage |
S3_BUCKET | Bucket name where backup files are stored |
BackupManager connects to S3 and creates the bucket if it does not already exist. If the bucket already exists, startup continues normally.
Backup file naming
Each backup file is named after the prefix it represents. Forward slashes in the prefix are replaced with underscores so the filename is safe for S3 object keys:| Prefix | Backup filename |
|---|---|
192.0.2.0/24 | prefix_192.0.2.0_24.json |
2001:db8::/32 | prefix_2001:db8::_32.json |
backup_ripe_object() inside RipeObjectManager.__init__(), which runs before any RIPE API write:
BackupManager methods
BackupManager wraps the S3 client with three methods:
| Method | Description |
|---|---|
put(filename, content) | Uploads a JSON string as an S3 object with the given key |
get(filename) | Downloads and returns the raw bytes of an S3 object |
list() | Returns a list of all object keys in the configured bucket |
S3_BACKUP is not yes, all three methods are no-ops: put and get return None or an empty string, and list returns an empty list.
Browsing backups
Navigate to/backups in your browser to see a list of all backup files currently in the S3 bucket. The page is rendered server-side and shows every object key returned by BackupManager.list().
To download an individual backup file, request /backup/<name> where <name> is the object key shown on the /backups page.
If
S3_BACKUP=no, the /backups page renders an empty list. No error is returned.Restoring from backup
Download the backup file from/backup/<name> or directly from your S3 bucket, then POST it to the RIPE REST API:
inetnum with inet6num for IPv6 objects, and RIPE_MNT_PASSWORD with your maintainer password. The RIPE REST API will create the object if it does not exist, or return an error if a conflicting object is already present.