RavenDB periodic backups: how can I “clear the book” and force a full backup?

When you enable the RavenDB 'Period Backup Set , RavenDB does the following:

  • Backs up the entire database.
  • In each interval (or "n" minutes), RavenDB performs an incremental backup (or delta backup) of all changes that have occurred since the last interval.

I like this configuration with one caveat.

Every week, I want to “clear the book” and get RavenDB to back up the entire database and resume creating incremental backups from this new starting point.

How can I do this in an automatic way?

+4
source share
2 answers

From the Raven.Backup reference documentation :

  • incremental - Optional. When specified, the backup process will be incremental when done in the folder where the previous backup is located. If dest is an empty folder or it does not exist, a full backup will be created. To create incremental backups, the Raven / Esent / CircularLog configuration parameter must be set to false.

So the solution to my problem:

  • Delete the dest directory every week.
  • This will force RavenDB to create a full backup.
+2
source

I do not think this is a supported scenario.

The RavenDB periodic backup kit is designed to work with incremental updates , and AFAIK has nothing to force a full update or make the package assume that it is starting from scratch.

If you want to make full backups, you need to use Raven.Backup.exe , which can perform either incremental or full backups, you can run it programmatically, through REST and using the command line utility, and it works with IIS.

+1
source

Source: https://habr.com/ru/post/1479820/


All Articles