Sunday, 26 February 2012

Setting Modified Date/Time on TrueCrypt files on ReadyNAS shares so they Backup

Further to my last post regarding offsite backups. I've noticed that backup solutions can have a hard time with TrueCrypt containers, as they do not by default change the modified date on the file, which means that the backup program then has to scan a big fat file for byte level differences or a CRC check or some such (and that's assuming your backup program is clever enough to do anything other than a modified date check).

The general solution for this is to change a setting in TrueCrypt - disable "Preserve modification timestamp on file containers".

This probably won't work if your TrueCrypt file is stored on a ReadyNAS network share though - it didn't for me anyway.

A simple solution (on Windows 7) is to run a batch script that uses PowerShell to modify the date/time before your backup runs (either as a step in the backup software itself, or just as a daily scheduled task).

The ChangeTCModifiedDate.bat file would look something like this:

powershell $(get-item \\ReadyNASBox\myfolder\mytruecryptfile.fil).lastwritetime=$(get-date)

Of course, this ReadyNAS problem isn't restricted to just TrueCrypt, see here:

No comments:

Post a Comment