Can duplicatii check file for changes not just metadata

One of the files I am backing up is a truecrypt volume.
It seems that altering the contents of this volume may not affect the file’s metadata and so duplicatii will ignore it. Is there a way of making duplicatii check the actual file contents (by comparing hashes) and deciding that way what needs to be backed up?

You can use advanced option --disable-filetime-check to check files completely instead of just the size and timestamp.
See this issue on GitHub for more information:

1 Like

Thank you very much kees-z for the quick response. It’s exactly what i was looking for.
However I also appreciate the arguments about the increased time to make a backup that this will entail.
For me however, my most valuable data is in truecrypt and I need it to be backed up.

So the best answer might be to undo the setting in truecrypt that stops the timestamp
of the volume being modified. In truecrypt, Settings->Preferences, uncheck the option
’Preserve modification timestamp of file containers’

I just found that here: How to make a Truecrypt file appear to be changed for Windows - Ars Technica OpenForum

I think I will try this first.

Are you backing up the CONTENTS of the TrueCrypt “volume” or the volume file itself?

I ask only because if you’re backing up the raw volume file you MIGHT see larger backup sizes than expected due to TrueCrypt’s encryption changing the alignment of the blocks Duplicati uses for de-duplication. (This is a guess, I haven’t actually tested it myself.)

@kenkendk, am I correct in assuming that there could be some serious loss in de-duplication benefits involved in using Duplicati to back up a virtual disk (such as a TrueCrypt volume) that is internally formatted with a COW (Copy On Write) file system?

@JonMikelV Thanks for that. yes it is the volume file itself that is getting backed up.I appreciate that it might be bigger for the reasons you state but for now anyway I’d prefer it to be as automatic as possible.

1 Like

My understanding of Truecrypts internals may be flawed, but as I understand it, they essentially write one big chunk of random data, filling the entire area. Then they format the volume, using a block layer (that is also encrypting).

As any filesystem operation on top will need to write a block (and due to encryption) a write will change at least one block. For simple math, lets assume that the Trucrypt volume uses 1MB blocks. Every write or metadata update inside the volume will then trigger at least 1MB new data.

When Duplicati reads the data, using another block-size (say 100kb), it will find at least 10 blocks of 100kb changed data. If the offsets do not align (or the block sizes are not evenly divisible), it will find 2 extra blocks.

I am fairly sure this is how it works, as it would be extremely slow if Truecrypt rewrote the entire volume at any point.

So using Duplicati to back up TrueCrypt volumes would likely result in SLIGHTLY larger backups than direct volume CONTENT backups, but it probably won’t totally balloon into entire volume backups every run. Yay! :slight_smile:

Maybe I’ll change from backing up my TC file contents to just the volume now… :thinking: