Short question: I have two dynamically generated tar archives (so they have different timestamps), how can I compare them, ignoring any different in time?
I am doing some backup, in which I use a script to generate things that needs to be backed up, put them in to a directory, then tar the directory and keep several old versions. The backup script needs to run every 30 minutes to make sure we don't lose hours of work.
Now I realize that there are periods of time that the data doesn't change, so it doesn't make sense to store duplicates of the same thing over and over again. I would like to compare the archives before saving. My attempt was to run
cmp newdata.tar.gz olddata.tar.gz and only store
newdata.tar.gz if it contains new data. Apparently that didn't work, because there are different timestamps.