This project has moved. For the latest updates, please go here.

Incremental backups?

Jan 6, 2012 at 2:58 AM

I am trying to setup incremental backups, and something fishy seems to be going on.

I setup the database as circular log disabled and try to run the following:

Api.JetBackupInstance(instance, "backup", BackupGrbit.Atomic, (sesid, snp, snt, data) =>{ Console.WriteLine(string.Format("Full Esent {0} {1} {2}", snp, snt, data).Trim()); return JET_err.Success;});

Api.JetBackupInstance(instance, "backup", BackupGrbit.Incremental, (sesid, snp, snt, data) =>{ Console.WriteLine(string.Format("Incremental Esent {0} {1} {2}", snp, snt, data).Trim()); return JET_err.Success;});

The second line throws an error that the backup directory is not empty. I am not really sure what is going on. I also tryed BackupGrbit.None for the first call.

I looked at the tests, but there doesn't seem to be anything about incremental backups there

Developer
Jan 24, 2012 at 3:41 AM

Ian answered this for you separately (thanks Ian!); pasting here so that others will have this information.

Incremental backup just copies log files.  You are meant to combine one or more incremental backups with just one full back at time of restore.  The log series must be contiguous.  No gaps in the log sequence what so ever are tolerated since log replay must go from in an unbroken series.  The error you get says that the backup directory is empty.  Have you tried it with an empty backup directory?  You combine the data at restore time, not backup time.

-martin