Acronis Backup And Deferred Writes

FAQ, getting help, user experience about PrimoCache
Post Reply
Stubi
Level 5
Level 5
Posts: 47
Joined: Tue Aug 24, 2010 12:36 pm

Acronis Backup And Deferred Writes

Post by Stubi »

I use Acronis partition backups and PrimoCache with deferred write. Now I ask myself if this might give a problem. Acronis backup might be aware of a Windows cache that it could flush before creating the backup but not of a PrimoCache cache. On the other hand I do not know how PrimoCache is coded. Could there be any problems with Acronis True Image backups when I use PrimoCache deferred write?
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Acronis Backup And Deferred Writes

Post by InquiringMind »

It's very likely that Acronis (and similar backup software) would be using its own driver to access your data, bypassing Primo's cache completely. However if you're uncertain, you should be able to verify the backups Acronis makes following these instructions.
Stubi
Level 5
Level 5
Posts: 47
Joined: Tue Aug 24, 2010 12:36 pm

Re: Acronis Backup And Deferred Writes

Post by Stubi »

Thank you for your response. My question was not about validating the output file of Acronis. It was about the backup source at the time when the backup is created. I could imagine that Acronis flushes the Windows write cache to have all data in the backup - it even has to cache changes that are made to the backup disk while the backup is created because the backup disk needs to be locked (the user does not realize this and still can use it because of this Acronis cache at the time of the backup creation).

But I guess it will not flush the Primo write cache because it does not know about it. If so this would mean that the backup has the same data as you would have with a sudden system shutdown - all PrimoCache deferred writes would not be written to disk and so they would not be in the backup what could/will lead to a system backup with corrupted data. It will be still okay for Acronis because it does not and cannot check things like this. The Acronis validation is just a CRC check of the backup file.

But I am not sure if Acronis will forget the not written PrimoCache data because it does not expect a further and not Windows cache but I can imagine it will. At the moment I switch off PrimoCache to avoid this before I create a backup. But I am not sure if this is really necessary and makes sense. This is my question.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Acronis Backup And Deferred Writes

Post by InquiringMind »

Stubi wrote:...I could imagine that Acronis flushes the Windows write cache to have all data in the backup - it even has to cache changes that are made to the backup disk while the backup is created because the backup disk needs to be locked...
(Long answer follows - sorry!)

Acronis' website makes no mention of such caching and it seems unlikely since, given the time involved to create a full image backup, many gigabytes of data could be modified on a busy system, requiring a massive cache.

I suspect that Acronis may function in a similar manner to Drive Snapshot (the backup software I use) which uses a driver to monitor disk activity during an image backup. Using this, any attempts to modify data are intercepted and delayed until the original data is backed up (which is done immediately). That means the backup should include data at the point the backup was started, with any changes made during the backup being excluded.

The question then is whether the data copied by Acronis (or Drive Snapshot) includes PrimoCache write deferred changes. My best guess here is that, with PrimoCache working at block level, imaging software won't see write deferred changes but, unless the write defer time is very long (i.e. minutes rather than seconds), it is likely that such changes will have been written through to disk by the time the data is imaged - especially if the imaging software takes time to "prepare" a backup (e.g. Drive Snapshot by default creates a checksum database to allow subsequent incremental backups which can take 30+ seconds on a large disk).

Any attempt by software to make further changes during the image backup would be intercepted (as mentioned above) and should not reach PrimoCache until the original data was backed up (exception - programs that write directly to disk like Microsoft Exchange, but these will likely bypass PrimoCache too).

So the only situation where (write deferred) data might not be backed up would be if it was close enough to the start of a disk to be copied within PrimoCache's write defer time. Even then, that discrepancy should be detected by software that validates images post backup (an option well worth enabling by default).

So, pending official word from Romex or Acronis, best advice is to enable validation of backups and be wary over increasing the write defer time. Pausing the cache shouldn't be necessary in most cases, but if you want to be extra cautious, it is a prudent step to take.
Stubi
Level 5
Level 5
Posts: 47
Joined: Tue Aug 24, 2010 12:36 pm

Re: Acronis Backup And Deferred Writes

Post by Stubi »

InquiringMind wrote:So the only situation where (write deferred) data might not be backed up would be if it was close enough to the start of a disk to be copied within PrimoCache's write defer time. Even then, that discrepancy should be detected by software that validates images post backup (an option well worth enabling by default).
The validation check of Acronis after the backup is only a CRC check. That means the created backup file needs to have a correct CRC and so no write/read errors. It is nothing more. For this reason you can start this validation at any time after the backup was created.

Acronis will not care if the backed-up data on the disk is correct as long as there are no reading errors when collecting the backup data. More is not possible. On restore it will check things like if the MFT of the backup is useable and if not you will have bad luck even with a validated backup - again the validation was a CRC check of the backup file only. I just had such a bad situation where a restore did not work despite positive validation and the backup even could be mounted error free. But the MFT in the backup had bitmap errors and so Acronis suddenly said when the restore was started - sorry I cannot use it. Was very bad for me this "late check concept". But this is why I started thinking what might happen with the PrimoCache deferred write data.

Sure you might have luck that PrimoCache just flushes by accident the write cache at the right moment. But if not will you have the correct data in the backup or could it just contain scrap for some data that were not flushed yet? Again - Acronis will and cannot check this. They just take what they find and don't think too much about it. This is not their business.

For me PrimoCache and here especially the deferred write concept is a great idea. I even set the flush time at risky 900 and this on a busy RAID 0 system. Intel RAID provides a write cache too. It might sound strange but this slows down my system. This is not the case with PrimoCache at least as long as there are no urgent writes. Then the performance is a big problem. But if it is necessary to switch off deferred writes while the backup is created users should be warned. If it is not necessary forget the problem and just give a green light.
Last edited by Stubi on Tue Oct 01, 2013 5:07 pm, edited 1 time in total.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: Acronis Backup And Deferred Writes

Post by InquiringMind »

If Acronis offers only a CRC check (and no option to properly verify backups once they are done) then frankly I'd suggest using something else. I do recall (when they had their forum at Wilders' Security) a number of threads complaining about backups not working on restore - if that is still an issue then I'm gobsmacked.
Post Reply