Overview
The Database Dumps API allows administrators to manage database dump files, making them available for download. This is useful for backups, data analysis, or sharing dataset snapshots with the community.Authentication
All endpoints require:- Valid authentication token
- Administrator role/permissions
- Bearer token in Authorization header
Dump Structure
Database dumps contain the following fields:| Field | Type | Description |
|---|---|---|
dump_id | integer | Unique identifier for the dump |
path | string | File path to the dump file |
public | boolean | Whether the dump is publicly accessible |
link | string | Download URL for the dump (auto-generated) |
created_at | datetime | When the dump was created |
updated_at | datetime | When the dump record was last updated |
Endpoints
List Dumps
Get a paginated list of public database dumps.By default, this endpoint returns only public dumps (where
public is true).- Standard pagination and filtering parameters
- Supports field selection and includes
Create Dump
Register a new database dump file.This endpoint registers a dump file in the system. The actual database dump file must be created separately using database backup tools.
path- File path to the dump filepublic- Whether the dump should be publicly accessible
Get Dump
Retrieve information about a specific dump.id- The dump ID
Update Dump
Update dump metadata (typically to change visibility).id- The dump ID
Delete Dump
Permanently delete a dump record.id- The dump ID
Downloading Dumps
To download a dump file, users can access thelink URL provided in the dump record:
public: true.
Usage Examples
Register a New Monthly Dump
Make a Dump Private
List All Available Dumps
Delete an Old Dump Record
Dump Types
Database dumps typically come in different formats:Full Database Dumps
Full Database Dumps
Complete snapshots of the entire database, usually generated monthly.Naming convention:
animethemes-YYYY-MM-DD.sql.gzThese dumps contain all tables and data for a complete restore.Incremental Dumps
Incremental Dumps
Dumps containing only changes since the last full dump.Useful for reducing file size and transfer time for regular backups.
Table-Specific Dumps
Table-Specific Dumps
Dumps of specific tables for targeted data exports.Example:
animethemes-wiki-2026-03.sql.gz for wiki tables only.Best Practices
Regular Backup Schedule
Regular Backup Schedule
Create dumps on a regular schedule (e.g., monthly) to ensure data is backed up consistently. Use automated scripts with the API to register new dumps.
Retention Policy
Retention Policy
Implement a retention policy to manage storage:
- Keep last 12 monthly dumps
- Keep last 4 weekly dumps
- Delete dumps older than 1 year
Verify Dump Files
Verify Dump Files
Before registering a dump via the API, verify the dump file:
- Check file integrity
- Verify file size is reasonable
- Test restoration in a development environment
Public vs Private
Public vs Private
Consider which dumps should be public:
- Public: Anonymized datasets, historical data, community releases
- Private: Recent dumps, dumps containing sensitive data, test dumps
Naming Conventions
Naming Conventions
Use consistent naming conventions for dump files:
- Include date in ISO format (YYYY-MM-DD)
- Include dump type (full, incremental, specific tables)
- Use descriptive names:
animethemes-full-2026-03-01.sql.gz
Creating Database Dumps
While this API manages dump records, the actual dump files are created using database tools:The API manages dump metadata and download links. The actual dump file creation and storage is handled separately by database backup tools and storage systems.
Security Considerations
Related
Database Dumps Guide
Comprehensive guide to database dumps
Storage Configuration
Configure dump file storage