How does TM determine daily/weekly/monthly backups

Discussion in 'macOS' started by netnothing, Oct 31, 2007.

  1. netnothing macrumors 68040

    netnothing

    Joined:
    Mar 13, 2007
    Location:
    NH
    #1
    Ok, so I get the whole 'hard link' thing with Time Machine, and I understand how it does hourly backups.

    Now my question is......I'm trying to wrap my head around how it does daily/weekly/monthly backups.

    Here's an example, let's say I have testfile.txt. Let's say I make a change to this file about every hour. TM will backup each iteration of the file each hour, and I'll see it in the TM interface.

    Now, what happens after 24 hours goes by and I lose the hourly backups and it puts everything in a daily backup? What file is stored? The last at the time it does the last delete of the dailies?

    So I guess what I saying is.....is the daily backup basically the snapshot of the last hourly backup?

    If that's the case, I'm guessing I would lose all the other iterations of the file?

    Just curious if anyone knows. I'm actually trying this out now, but have to wait 24 hours ;).

    -Kevin
     
  2. LMO macrumors member

    Joined:
    Jun 8, 2007
    #2
    I would guess that all but the last hard link for each file, for that day, would be removed, so it wouldn't just be a snapshot of the last hourly.

    What did your testing indicate?
     
  3. netnothing thread starter macrumors 68040

    netnothing

    Joined:
    Mar 13, 2007
    Location:
    NH
    #3
    Yeah, the more I think about it, it can't just be the last hourly snapshot....for example, what if I create a file, and it gets backed up for half the day....but then I delete the file. Will that file be in the daily backup?

    I'll let you know tomorrow after 11am....that should be past the 24 hour mark for the file.

    -Kevin
     
  4. theman macrumors 6502a

    Joined:
    Jul 26, 2007
    #4
    if it just saves the last version from that 24hr period, i guess you just have to make sure you have the document right before you pack up for the day. and if you make a drastic change to a file, its a good plan to save it with a different filename...
     
  5. netnothing thread starter macrumors 68040

    netnothing

    Joined:
    Mar 13, 2007
    Location:
    NH
    #5
    So it looks like I may have to wait a little longer to see exactly what happens.

    Although I am noticing something interesting.

    Looking into the past, and this happened yesterday as well, I notice that Time Machine always keeps the hourly backup closest to the time it did the daily backup.

    For example, looking at my Time Machine, I have the following backups:

    2007-10-27-004903 - Oct 27, 2007 12:49 AM
    2007-10-28-004906 - Oct 28, 2007 12:49 AM
    2007-10-29-002249 - Oct 29, 2007 12:22 AM
    2007-10-30-002252 - Oct 30, 2007 12:22 AM

    Those are the daily backups that TM made.

    Now after that are the hourly entries....however the first one is always the next days hourly at around 12:22AM. So in this case my next entry is:

    2007-10-31-002258 - Yesterday, 12:22AM

    Now what's interesting is....this directory sticks around. My next directories are:

    2007-10-31-132303 - Yesterday 1:23 PM
    2007-10-31-142304 - Yesterday 2:23 PM

    I'm writing this at 1:23PM. So, when TM deletes the oldest hourly backup....it does it after the first hourly backup of the day.

    So I'm wondering if that first hourly backup, is what will become the daily? Or will TM use that to do a compare with the last hourly of the day?

    note, obviously I have other directories beyond these, I'm just leaving them out for the sake of post.

    -Kevin
     
  6. netnothing thread starter macrumors 68040

    netnothing

    Joined:
    Mar 13, 2007
    Location:
    NH
    #6
    Ok, so this is interesting, I created the file on 10/31 at 10am.....and the file is NOT in the daily backup for 10/31.

    I'm beginning to think more and more that the very first hourly backup of the day, becomes the daily backup. That would explain why the file isn't in the 10/31 daily backup.

    Also, in addition to the original file I created on 10/31 that is still on my machine, I created another that I made sure got backed up in the hourlies, but then I deleted it from my system. Well, looks like I can't get that file back at all now because it didn't exist at the time TM took a snapshot first thing in the morning, and 24 hours have past since creating it.


    -Kevin
     

Share This Page