Results 1 to 10 of 10

Thread: zmrestore point-in-time recovery not working

  1. #1
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    718
    Rep Power
    9

    Default zmrestore point-in-time recovery not working

    I upgraded from ZCS 4.5.6 to 4.5.10 on November 23.

    Since then, I've been unable to do point-in-time recoveries with any accuracy. The recoveries complete without error, but restore to a point much later than specified. The first 3 I could excuse, since they predate the software update, but the 4th example restores to December 8. WTF?

    mailbox.log and zmbackupquery -v show that I've been running backups on the regular schedule without error. The accounts in question are listed as backed up, and manually inspecting the contents of /opt/zimbra/backup/sessions, I see relevant data.

    Code:
    zmrestore -a him@example.com -pre oct21_ -ca -lb full-20071024.060416.881
    
    zmrestore -a him@example.com -pre oct21_ -ca -lb full-20071027.060005.051
    
    zmrestore -a him@example.com -pre oct27_ -ca -restoreToRedoSeq 8475
    
    zmrestore -a her@example.com -ca -pre nov24_ -restoreToTime 20071124120000

  2. #2
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    How about: zmrestore -a her@example.com -ca -pre restored_ -lb full-DateOfFullThatsBeforeRestoreToTime -restoreToTime 20071124120000

  3. #3
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    718
    Rep Power
    9

    Default

    The two most recent full backups for the user were 20071121.203045.007 and 20071117.070004.674.

    I ran:

    zmrestore -a ***@carleton.edu -ca -pre restored_ -lb full-20071121.203045.007 -restoreToTime 20071117.070004.675

    The output was "using restore to time of 2007/11/17 07:00:04 675", a millisecond after the former full backup. But the account was restored as of the latter full backup on 20071121. That's better than December 8th, at least, which is what I get using just -restoreToTime 20071117, without the -lb option.

    This resolves the critical issue for that user (turns out the mail wasn't deleted until after the 21st), but it seems that point-in-time recoveries do not work for me at all anymore. Anything specific to look for, or should I just open a support case? Has anyone else seen this?
    Last edited by Rich Graves; 12-12-2007 at 11:44 AM.

  4. #4
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Quote Originally Posted by Rich Graves View Post
    The two most recent full backups for the user were 20071121.203045.007 and 20071117.070004.674.
    I ran:
    zmrestore -a ***@carleton.edu -ca -pre restored_ -lb full-20071121.203045.007 -restoreToTime 20071117.070004.675
    full-20071121.203045.007 is after -restoreToTime 20071117.070004.675
    Try with that full that is before restore to time date (full-20071117.070004.674)

  5. #5
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Fulls after the restoreToTime date wouldn't have the incrementals/redologs to the prior time - they are like a one time snapshot of everything.
    So if you want to do a restoreToTime the -lb needs to be the date of a full that took place before the restoreToTime, by default (when no -lb is specified) it just uses the last full backup - so in your case it's going back as far as it can, which is thought to be better than nothing appearing.

    These options affect redo log replay phase of restore:
    -restoreToIncrLabel <arg> : Replay redo logs up to and including this incremental backup
    -restoreToRedoSeq <arg> : Replay up to and including this redo log sequence
    -restoreToTime <arg> : Replay redo logs until this time
    Without these options, all redo logs since full backup are replayed, and also the logs not yet backed up (those under /opt/zimbra/redolog/archive and /opt/zimbra/redolog/redo.log) if -br option is not specified. The new options allow cutting off the replay at certain point. (Of course, no logs are replayed at all if -rf option is used to restore to full backup only.)
    Last edited by mmorse; 12-12-2007 at 08:09 PM.

  6. #6
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    718
    Rep Power
    9

    Default

    Yes, that actually makes sense (the other way didn't, but I'd read your post twice and though that's what you were saying).

    Has the -lb option always been required? I thought -restoreToTime would figure out which full to start from. It's entirely possible that every previous restore I've done has been to a point in time later than the most recent backup.

  7. #7
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

  8. #8
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    Default

    Quote Originally Posted by Rich Graves View Post
    Yes, that actually makes sense (the other way didn't, but I'd read your post twice and though that's what you were saying).

    Has the -lb option always been required? I thought -restoreToTime would figure out which full to start from. It's entirely possible that every previous restore I've done has been to a point in time later than the most recent backup.
    Rich,
    Please cc yourself on that bug, and shoot an e-mail to support@zimbra.com and allow them to look at your system. Please reference the bug, and explain your situation.

    Thanks
    john

  9. #9
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    I honestly don't remember the original functionality, I've just always used -lb, guess I'm a stickler for extra syntax
    I suppose someone can throw 4.0 on a box/vm and test some upgrades & backups to see if it ever changed - I really don't have the time...and the code isn't exactly on sourceforge for quick comparison-being a NE feature and all.
    -jhahm & bhwang might shed some light on this

    Of course, if it's not easy to 'fix it' so that it can properly figure out which full to start from, maybe just a warning when date of restoreToTime is prior to latest full/date of given full & we'll just document it.

    I thought it might be time to re-examine, cuz as the saying in the military goes:
    Once is an accident or luck
    Twice is a coincidence or happenstance
    Three times is conspiracy, though ID-10T's still insist it just a fluke
    Four times is an enemy action
    -& that's been 4 threads + at least one support ticket
    Last edited by mmorse; 12-13-2007 at 09:19 AM.

  10. #10
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Think that I had found -lb is helpful when doing -restoreToRedoSeq
    I don't remember the last time I tested -restoreToIncrLabel without -lb, outside of finding an extra 'e' in some of the docs Bug 19744 - restoreToIncrLabel (not restoreToIncreLabel)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 23
    Last Post: 01-24-2013, 03:44 PM
  2. zmrestore -restoreToTime not working
    By jeffw in forum Administrators
    Replies: 2
    Last Post: 12-11-2007, 09:13 AM
  3. Mail filters not working all of the time..
    By padrino121 in forum Administrators
    Replies: 17
    Last Post: 08-30-2007, 05:44 AM
  4. Time mess everything up
    By Peque in forum Zimbra Connector for Outlook
    Replies: 4
    Last Post: 05-10-2007, 02:31 AM
  5. restore account to a point in time in the past
    By shanson in forum Administrators
    Replies: 1
    Last Post: 07-24-2006, 05:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •