You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 5.0 version.
Backup & Restore:
Frequently Asked Questions
In this page:
- Is there a one-time backup?
- How do I create a backup of my cluster configuration?
- How should the servers' time be set in a multi-node cluster?
- Is an External Replication a good substitute for a backup task?
- Can I simply copy the database folder contents whenever I need to create a backup?
- Does RavenDB automatically delete old backups?
- Are there any locations that backup files should NOT be stored at?
- What happens when a backup process fails before it is completed?
Is there a one-time backup?
No. Backup is an on-going task and is meant to back your data up continuously.
- If you wish, you can trigger it for immediate execution and then disable or delete the task.
- You can also use Smuggler as an equivalent of a full backup for a single export operation.
How do I create a backup of my cluster configuration?
Only database contents can be backed up. Cluster configuration and nodes setup can be easily re-created, no special backup procedure is needed for it.
How should the servers' time be set in a multi-node cluster?
The backup task is running on schedule according to the executing server local time.
It is recommended that you set all nodes to the same time. This way, backup files' time-signatures are consistent even when the backups are created by different nodes.
Is an External Replication task a good substitute for a backup task?
Can I simply copy the database folder contents whenever I need to create a backup?
Simply copying the database folder is not a good substitute for RavenDB's backup procedures.
Creating a backup task is a one-time operation. There really is no reason to do it manually again and again.
Other advantages of RavenDB's backup system include:
- The creation of a reliable point-in-time freeze of backed-up data.
- The assurance of ACID compliancy for backed up data during interactions with the file system.
Does RavenDB automatically delete old backups?
No, RavenDB does not automatically remove backup files, you need to take care of it yourself.
You can use services like crontab (a Linux scheduling procedure) to create an old-backup-files-removal routine.
Are there any locations that backup files should NOT be stored at?
It is recommended not to store backups on the same drive as your database data files, since -
- Reading from and writing to the same drive can slow down other database operations.
- Disk space can run low as backups start piling up.
- Both the database and the backups would be exposed to the same risks.
What happens when a backup process fails before completion?
While in progress, the backup content is written to a *.in-progress file on disk.
- Once backup is complete, the file is renamed to its correct final name.
- If the backup process fails before completion, the *.in-progress file remains on disk.
This file will not be used in any future Restore processes.
If the failed process was an incremental-backup task, any future incremental backups will continue from the correct place before the file was created.