4

I made an incremental backup about 10 months ago (on Jan 27, 2013), creating a .snar metadata file. Now, when I try to make an incremental backup using

tar --create --file=dropbox_incremental_1.tar --listed-incremental=dropbox_0.snar Dropbox

the command just re-backs up everything.

I'm not an expert at Unix timestamps, but I noticed that virtually all of my directory timestamps are way more recent than the last time they changed. For my actual files, they look like this:

Access: 2013-03-12 19:04:51.000000000 -0500
Modify: 2012-09-30 15:10:47.000000000 -0500
Change: 2013-03-12 19:04:51.306209672 -0500

The 'Modify' timestamp seems correct, but the files were definitely not changed (at least not doing anything that I know of) at the time they say they were. These files still seem to go into the incremental archive.

What's happening here? Is there a way to tell tar to look at the 'modify' timestamp? Isn't this what it's supposed to be doing?

Cyclic
  • 41
  • 3

3 Answers3

0

You didn't mention the filesystem/device type, but you could try:

$ tar --create --no-check-device --file=dropbox_incremental_1.tar --listed-incremental=dropbox_0.snar Dropbox

Also see Fixing Snapshot Files.

rickhg12hs
  • 394
  • 2
  • 9
0

Tar looks mtime indeed. But It should also look ctime as well since it processes file's metadata (e.g. permissions).

My guess is your dropbox application uses ctime for its own purposes and nothing you can do with it.

UPD:

You may use update option -u instead of incremental mode. It seems to ingnore ctime.

Veniamin
  • 853
  • 6
  • 11
0

Ultimately I couldn't find a way to get --listed-incremental working with Dropbox. I'm guessing, as Veniamin said, tar looks at both ctime and mtime. Dropbox must do something that touches ctime, so it just causes the entire archive to get backed up each time I run it.

Instead, I just did tar --create --file mybackup.tar --newer-mtime="26 Jan 2013" Dropbox

While it's not quite as slick as the incremental backup, I'm happy with it, as it should get all the files that have changed (based on mtime) since my last backup. In this case, this backup is a third backup, so if something happens where I'm reaching to this one, I'll be happy to just have the files and dealing with a not-perfectly-slick system will be fine.

Thanks for your responses.

Cyclic
  • 41
  • 3