Latitude.sh Databases offers scheduled backups to S3-compatible storage, allowing you to protect your data and restore it when needed. Backups are a critical component of any production database strategy, ensuring business continuity and data protection. Restoring a database from a backup is a vital operation that allows you to recover your data in case of accidental deletion, corruption, or when you need to create a copy of an existing database.
When creating a new database or modifying an existing one, you can enable and configure scheduled backups:
Check the box next to “Scheduled Backups” when creating a database or navigate to the database overview page for an existing database.
Enter the name of your S3 bucket and specify the backup path where the backups will be stored (E.g. /backups).
Provide your S3 Endpoint.
Enter your Access Key ID and Secret Access Key.
Use the Schedule (Cron) dropdown to set how often backups should run. For a custom schedule, enter a six-field cron expression (E.g. 0 0 3 * * * for daily backups at 3 AM UTC).
In the Retention field, enter how many days backups should be kept (E.g. 30 days).
Click Apply to save the backup configuration.
Once enabled, you’ll see a shield icon next to your database in the database list, indicating that backups are active.
Latitude.sh provides multiple intuitive ways to restore databases from backups, ensuring this functionality is easily accessible when you need it most, especially in critical situations.
For an optimal database backup and restoration strategy:
Set appropriate frequency: Configure backup frequency based on how much data you can afford to lose. Critical applications might require hourly backups, while less critical ones might be fine with daily backups.
Test your backups and restoration: Periodically create a test database from a backup to verify that your backups are working correctly and can be restored. Regularly testing your backup restoration process is recommended to ensure you can recover your data when needed.
Secure your S3 credentials: Ensure that the S3 credentials used for backups have appropriate permissions and are securely stored.
Consider retention periods: Set retention periods based on your compliance requirements and storage constraints.