Backup and restore

Backup and restore in Aura

Data protection is one of the most important aspects of database management. Whether you’re preparing for a major application update, migrating between environments, or simply want to ensure you can recover from unexpected problems, having a solid backup and restore strategy is essential.

In this lesson, you will learn how to:

  • Understand Aura’s snapshot system for automated backups

  • Export and manage snapshots for long-term storage

  • Restore data from snapshots and local backup files

  • Plan your backup strategy

Understanding Aura snapshots

Snapshots are Aura’s term for backups. The tier determines when they are taken and how many are kept available in Aura itself.

snapshot

Purpose of snapshots

Snapshots are your safety net. Think of them as save points in a video game - you can always go back to a known good state.

Aura creates snapshots based on your instance tier:

  • Aura Free: On-demand only and limited snapshot retention

  • Aura Professional: Regular automated snapshots with longer retention

  • Aura Business Critical: Frequent automated snapshots with extended retention periods

Snapshot frequency and retention

The specific frequency and retention periods vary by tier:

  • Aura Free: On-demand snapshots only; only the latest snapshot is available

  • Aura Professional: Daily scheduled snapshots, retained for 7 days

  • Aura Business Critical: Daily full snapshots plus hourly differential snapshots, retained for 30 days

  • Aura Virtual Dedicated Cloud: Hourly snapshots for the first 7 days, then daily snapshots from day 8 to 60

Taking on-demand snapshots

You can manually trigger a snapshot at any time by selecting Take snapshot from the Snapshots tab of your instance. This is particularly useful:

  • Before major application updates or changes

  • After significant data imports

  • Before performing risky operations

  • When you need a backup outside the regular schedule == Working with snapshots

There are three key actions you can take with any snapshot:

  • Export - Download the snapshot to your local machine for long-term storage.

  • Create a new instance from snapshot - Spin up a new Aura instance using the snapshot data.

  • Restore - Revert your current instance to the snapshot’s point in time.

Snapshot actions

snapshotactions

Export snapshots

Export downloads the snapshot to your local machine. This is crucial for long-term archival beyond Aura’s retention period, especially when you need to meet compliance requirements that mandate offline backups.

It’s also essential for creating backups before major changes or migrations, and for sharing data securely with development teams.

How to export a snapshot

To export a snapshot:

  1. Navigate to the Snapshots tab within your Aura instance

  2. Locate the snapshot you want to export

  3. Click the more menu (…​) next to the snapshot

  4. Select Export to download the snapshot

The download time depends on your database size and network speed.

Export file formats

Exported snapshots use different file formats depending on your Neo4j version:

  • Neo4j Version 5: .backup format (changed October 1, 2024)

  • Neo4j Version 4.x: .dump format

Store your exported snapshots in a secure location with a clear naming convention that includes the instance name and export date.

Create new instances from snapshots

Create instance from snapshot spins up a fresh instance with the snapshot’s data. This is perfect for setting up development environments that mirror production, allowing you to test changes on a copy of real data.

You can also use this to create staging environments for application testing, or as part of your disaster recovery scenarios.

How to create an instance from a snapshot

To create a new instance from a snapshot:

  1. In the Snapshots tab, find the snapshot you want to use

  2. Click the more menu (…​) next to the snapshot

  3. Select Create instance from snapshot

  4. Choose your desired tier and size (can be different from the original)

  5. Follow the prompts to configure the new instance

Remember

The new instance will be billed separately according to its selected tier and size. The time to create the instance varies based on database size and system load.

Restoring snapshots

Restore reverts your current instance to the snapshot’s point in time. You want to 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.

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:

  1. Go to the Snapshots tab in your Aura instance

  2. Locate the snapshot you wish to restore

  3. Click the restore icon (↩) next to the snapshot

  4. Type RESTORE to confirm the action

  5. 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.

Previewing snapshot data

There’s no direct way to preview snapshot contents before restoring. However, you can:

  • 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

Restoring from backup file

restore

Restoring using local files

If you have a backup or dump on your local system (different from having snapshots available in Aura), you can use it to overwrite the current instance.

This is particularly useful when:

  • Migrating from a self-managed Neo4j setup to Aura

  • Restoring from an exported snapshot

  • Loading data from another Neo4j environment

How to restore from a local backup file

To restore your instance from a local backup file:

  1. Navigate to the Restore from backup file tab in your Aura instance

  2. Drag and drop your .backup, .dump, or .tar file, or click to browse

  3. Confirm the restoration, understanding that this will overwrite all existing data

  4. 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.

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, you’ll need to use the Neo4j Admin command-line tool:

bash
neo4j-admin database upload <database-name> \
  --from-path=<path-to-backup> \
  --to-uri=<aura-instance-uri> \
  --to-user=<username> \
  --to-password=<password>

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 a great way to get started with smaller databases 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 you have a reliable backup that meets your compliance and retention requirements.

  • Test your restore process - Regularly test restoring from snapshots to ensure you can recover data when needed. This helps identify any issues in your 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.

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

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.

Compliance and retention

Consider your organization’s requirements:

  • How long must backups be retained?

  • Are there specific compliance requirements?

  • Do you need backups stored in specific geographic regions?

  • Are there encryption requirements for exported snapshots?

Security and data protection

Neo4j Aura provides built-in security for your backups:

  • Encryption at rest: All snapshots are stored in encrypted cloud storage buckets

  • Encryption in transit: Data is encrypted during backup and restore operations

  • Dedicated storage: Each instance has dedicated, secure storage for backups

  • Access control: Only authorized users can export, restore, or create instances from snapshots

Your exported snapshot files maintain this security, but you’re responsible for securing them once downloaded to your local system or external storage.

What’s included in snapshots

Snapshots provide a complete backup of your database instance, including:

  • All nodes, relationships, and properties

  • Indexes and constraints

  • Database schema and structure

  • Users, roles, and permissions

  • Configuration settings

This ensures that when you restore or create an instance from a snapshot, you get an exact replica of your database at that point in time.

Restoring using the Aura API

You can also restore an instance and create a new instances from a snapshot by its ID through the Aura API.

The API is particularly useful for:

  • Automating backup and restore operations

  • Integrating with CI/CD pipelines

  • Managing multiple instances programmatically

View the Aura API reference documentation

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

Think about what you need most when something goes wrong with your database. What would help you get back to a working state?

Solution

Snapshots provide backup and recovery capabilities for your data.

Snapshots are Aura’s backup system - they allow you to create save points that you can restore to if something goes wrong, export for long-term storage, or use to create new instances with the same data.

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

Look back at the lesson content about the three key snapshot actions. What were the specific operations mentioned that you can perform?

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 about Aura’s comprehensive backup and restore capabilities, including:

  • Snapshot frequency and retention - How different tiers (Free, Professional, Business Critical, VDC) handle automated and on-demand snapshots

  • Exporting snapshots - How to download snapshots in .backup or .dump format for long-term storage

  • Creating instances from snapshots - How to spin up new instances from existing snapshots for testing or development

  • Restoring snapshots - The step-by-step process to revert your instance to a previous state

  • Restoring from local files - How to upload backup files up to 4GB through the console or use command-line tools for larger files

  • Security considerations - How Aura encrypts your data at rest and in transit

  • What’s included - Understanding that snapshots contain all your data, schema, indexes, constraints, users, and configuration

You also learned about planning a backup strategy that includes regular exports, testing restore procedures, and meeting compliance requirements.

In the next lesson, you’ll move on to connecting to your instance and start working with your data directly.

Chatbot

How can I help you today?