Restoring from backups
You have learned how to create and manage snapshots, including exporting them and creating new instances.
Your mission in this lesson: Learn how to restore your recommendation engine from snapshots or local backup files. This enables you to recover from data issues or revert to previous states.
In this lesson, you will learn how to:
-
Restore your instance from a snapshot
-
Restore from local backup files
-
Plan your backup strategy
Restoring snapshots
Restore reverts your current instance to the snapshot’s point in time. Use this when you need to roll back problematic changes, when data corruption has occurred, or when you want to return to a known good state after testing.
If you accidentally delete data or make changes that break your queries, restoring from a snapshot lets you recover quickly.
Overwriting data
Restoring a snapshot overwrites all current data in your instance. Make sure you export a current snapshot first if you might need to recover the current state later.
How to restore a snapshot
To restore your instance to a previous snapshot:
-
Go to the Snapshots tab in your Aura instance
-
Locate the snapshot you wish to restore
-
Click the restore icon (↩) next to the snapshot
-
Type RESTORE to confirm the action
-
Click Restore to proceed
Restore process
Your instance will be temporarily unavailable during the restore process. The duration depends on your database size. Plan for potential downtime when restoring snapshots.
How it works in the background: Aura:
1. Stops your instance
2. Replaces all data with the snapshot’s data
3. Restarts your instance
4. Verifies the restore completed successfully
Previewing snapshot data
There’s no direct way to preview snapshot contents before restoring. However, consider these alternatives:
-
Create a new instance from the snapshot to inspect the data
-
Verify the snapshot timestamp matches your expected state
-
Check the snapshot size as an indicator of data volume
Test your data snapshot
Best practice: Before restoring, create a test instance from the snapshot to verify it contains the data you expect.
Restoring from backup file
Restoring using local files
If you have a backup or dump on your local system (different from snapshots available in Aura), use it to overwrite the current instance.
Local file restore works well for:
-
Migrating from a self-managed Neo4j setup to Aura
-
Restoring from an exported snapshot
-
Loading data from another Neo4j environment
If you exported a snapshot earlier or have a backup from another Neo4j instance, you can restore it to your Aura instance.
How to restore from a local backup file
To restore your instance from a local backup file:
-
Navigate to the Restore from backup file tab in your Aura instance
-
Click to browse and select your .backup, .dump, or .tar file
-
Confirm the restoration, understanding that this will overwrite all existing data
-
Wait for the process to complete
Local restore process
Your instance will be unavailable during the restoration process. Duration varies based on file size and system resources.
How it works in the background: Aura:
1. Uploads your backup file
2. Validates the file format
3. Replaces all instance data with the backup data
4. Restarts your instance
Important limitations
Keep these constraints in mind when restoring from local files:
-
Instance size: The target instance must be large enough to hold the data
-
Aura Free restrictions: Additional limitations on node and relationship counts apply
-
File size limit: Backup files cannot exceed 4GB for upload through the console
-
Larger files: Files bigger than 4GB require command-line tools
Handling files larger than 4GB
For backup files exceeding 4GB, use the Neo4j Admin command-line tool:
This command uploads your database directly to your Aura instance, bypassing the console file size limitation.
When to use local restore
The use case for local file restore is somewhat limited, but it’s useful when moving from self-managed setups to Aura.
Consider this approach when:
-
Your backup file is under 4GB
-
You’re migrating from Neo4j Community or Enterprise
-
You need to bootstrap a new environment with existing data
-
You’re moving between different Neo4j hosting environments
Planning your backup strategy
Having a backup plan is essential for data protection, as well as for managing changes and migrations.
Here are some best practices to consider:
-
Plan for regular exports - Schedule regular exports of important snapshots to your own storage. This ensures a reliable backup that meets compliance and retention requirements.
-
Test your restore process - Regularly test restoring from snapshots to ensure data recovery works when needed. This helps identify issues in backup and restore procedures before an actual need arises.
-
Consider compliance and retention - Understand your organization’s requirements for data retention and compliance. Ensure your backup strategy aligns with these needs, including how long backups must be kept and any specific storage or encryption requirements.
For more information, see the Neo4j Aura documentation on backup, export, and restore.
Regular snapshot exports
Regularly export important snapshots to your own storage:
-
Before major application deployments
-
After significant data imports or changes
-
On a scheduled basis for critical production data
-
Before performing any potentially risky operations
For your recommendation engine: Export snapshots after importing new movie data or making significant changes to your recommendation model.
Example backup schedules
Consider these backup schedules based on your environment:
-
Development: On-demand snapshots before major changes
-
Staging: Daily scheduled snapshots with weekly exports
-
Production: Hourly differential and daily full snapshots with weekly exports to external storage
Adjust your schedule based on your data change frequency, recovery time objectives, and compliance requirements.
Testing your restore process
A backup is only as good as your ability to restore from it. Regularly test your backup and restore procedures:
-
Create test instances from snapshots
-
Verify data integrity after restoration
-
Document your restore procedures
-
Train your team on the restore process
Snapshot testing
Use snapshot testing to validate your backups without affecting your production instance. Create a test instance from a snapshot and run verification queries to ensure data completeness and accuracy.
Check your understanding
Snapshot Purpose
What is the primary purpose of Aura snapshots?
-
❏ To monitor database performance over time
-
✓ To provide backup and recovery capabilities for your data
-
❏ To compress your database to save storage space
Hint
Snapshots capture your database state at a point in time, allowing you to recover if something goes wrong.
Solution
Snapshots provide backup and recovery capabilities for your data.
Snapshots are Aura’s backup system - they allow creating save points that restore data if something goes wrong, export for long-term storage, or create new instances with the same data.
Available Snapshot Actions
Which of the following actions can you take with an Aura snapshot? Select all that apply:
-
✓ Export the snapshot to your local machine
-
✓ Create a new instance from the snapshot
-
✓ Restore the snapshot to overwrite the current instance
-
❏ Share the snapshot directly with other Aura users
Hint
Download snapshots locally, use them to create new instances, or revert your current instance to a previous state. Direct sharing between users is not supported.
Solution
The correct answers are:
-
Export the snapshot to your local machine - Download for archival or compliance purposes
-
Create a new instance from the snapshot - Spin up a fresh instance with the snapshot’s data
-
Restore the snapshot to overwrite the current instance - Revert to the snapshot’s point in time
You cannot directly share snapshots with other Aura users - you would need to export the snapshot and share the file through your own secure channels.
Summary
In this lesson, you learned how to restore your recommendation engine from backups. You:
-
Restored from snapshots: Learned how to revert your instance to a previous snapshot point in time
-
Restored from local files: Understood how to restore from exported backups or files from other Neo4j instances
-
Planned your backup strategy: Learned best practices for regular exports, testing, and compliance
Restore capabilities ensure you can recover your data from data issues, accidental deletions, or problematic changes. A well-planned backup strategy protects your data and meets compliance requirements.
For more information on backup and restore, see the Neo4j Aura documentation on backup, export, and restore.
In the next lesson, you will learn how to connect to your instance and explore the tools available for interacting with your data.