none
How to use Bak files RRS feed

  • Question

  • Although I have said farewell to VFP long time ago I still have huge DB with tables in VFP9 and even dBase. One thing I have never learned is how to use bak table files. What are the rules? I could not find anything in VFP help. I cannot open them in the browser.

     

    Thanks.

    Monday, January 28, 2008 3:36 PM

Answers

  • You mean the Great Alex cannot figure out a .bak file?  Your kidding right?

     

    bak files are DBF files that are backed up for you by FoxPro when you do something to a DBF such as delete etc.  You don't use them, unless your DBF is damaged.  Then you rename the original dbf and change the BAK extension to DBF and you can use them.

     

     

    Monday, January 28, 2008 4:11 PM
  • "there is no way to open them in browser and take a look" is a wrong statement. Have you tried looking at MSSQL BAK files in browser? Was it any better?

    "...I am a forward looking man and in front of me I do not see anything Fox related."

    Probably because fox is miles ahead of you, try binoculars

    Monday, January 28, 2008 5:18 PM
  •  AlexBB wrote:

    Although I have said farewell to VFP long time ago I still have huge DB with tables in VFP9 and even dBase.

    sad to hear, you are missing out on something awesome. but on the other hand, I don't think you ever appreciated it so I'm sure you won't miss it.


     AlexBB wrote:
    One thing I have never learned is how to use bak table files. What are the rules? I could not find anything in VFP help. I cannot open them in the browser.
    true, there doesn't seem to be much mention of .bak (not that I recall coming across it in the helpfiles, then again I've never tried looking! lol)


    but what was said in one of the replies actually seems obvious, because if it had the same extension as your real files in use then you would easily get confused over what is a backup and what is not. (plus makes it easier to sort for or sort out for back ups in the file browser if the extension is different Big Smile )

    Monday, January 28, 2008 9:07 PM
  • BAK files are generated by ALTER TABLE in order to be able to roll back if an ALTER TABLE fails, as that is generating a new file and appending data behind the scenes. there are TBK and other backup files for other parts of the table.

     

    It's not intended to be your daily rollback version of the dbf. If you want to roll back to a certain point, you start a transaction, like in any other decent database.

     

    Tuesday, January 29, 2008 6:20 AM

All replies

  • You mean the Great Alex cannot figure out a .bak file?  Your kidding right?

     

    bak files are DBF files that are backed up for you by FoxPro when you do something to a DBF such as delete etc.  You don't use them, unless your DBF is damaged.  Then you rename the original dbf and change the BAK extension to DBF and you can use them.

     

     

    Monday, January 28, 2008 4:11 PM
  •  Don Higgins wrote:

    You mean the Great Alex cannot figure out a .bak file?  Your kidding right?

     

    bak files are DBF files that are backed up for you by FoxPro when you do something to a DBF such as delete etc.  You don't use them, unless your DBF is damaged.  Then you rename the original dbf and change the BAK extension to DBF and you can use them.

     

     

     

    Thank you Dan. You are right. I just showed to you I am not as great as you thought. I am good at making the impression though.

     

    It is kind of strange there is no way to open them in the browser and take a look. But it is the VFP way. I will have to accept it.

     

    Thanks again. I hope it is the last piece of Fox wisdom  will ever need.

     

    I have no bad feelings about Fox at all but I am a forward looking man and in front of me I do not see anything Fox related.

     

    Monday, January 28, 2008 4:36 PM
  • "there is no way to open them in browser and take a look" is a wrong statement. Have you tried looking at MSSQL BAK files in browser? Was it any better?

    "...I am a forward looking man and in front of me I do not see anything Fox related."

    Probably because fox is miles ahead of you, try binoculars

    Monday, January 28, 2008 5:18 PM
  •  CetinBasoz wrote:

    "there is no way to open them in browser and take a look" is a wrong statement. Have you tried looking at MSSQL BAK files in browser? Was it any better?

    "...I am a forward looking man and in front of me I do not see anything Fox related."

    Probably because fox is miles ahead of you, try binoculars

     

    I use binoculars only to look backwardsSmile

    Monday, January 28, 2008 6:41 PM
  •  AlexBB wrote:

    Although I have said farewell to VFP long time ago I still have huge DB with tables in VFP9 and even dBase.

    sad to hear, you are missing out on something awesome. but on the other hand, I don't think you ever appreciated it so I'm sure you won't miss it.


     AlexBB wrote:
    One thing I have never learned is how to use bak table files. What are the rules? I could not find anything in VFP help. I cannot open them in the browser.
    true, there doesn't seem to be much mention of .bak (not that I recall coming across it in the helpfiles, then again I've never tried looking! lol)


    but what was said in one of the replies actually seems obvious, because if it had the same extension as your real files in use then you would easily get confused over what is a backup and what is not. (plus makes it easier to sort for or sort out for back ups in the file browser if the extension is different Big Smile )

    Monday, January 28, 2008 9:07 PM
  •  mathmo wrote:
     
    sad to hear, you are missing out on something awesome. but on the other hand, I don't think you ever appreciated it so I'm sure you won't miss it.true, there doesn't seem to be much mention of .bak (not that I recall coming across it in the helpfiles, then again I've never tried looking! lol)


    but what was said in one of the replies actually seems obvious, because if it had the same extension as your real files in use then you would easily get confused over what is a backup and what is not. (plus makes it easier to sort for or sort out for back ups in the file browser if the extension is different )

     

    Thank you very much. I appreciate it.

     

    So the rule is:every time a table is changed the bak file is updated. Right? What is the practical meaning of it? I thought there is some algorithm, like backing up at the start of a session, It does not seem to be the case.

     

    What if I made a series of crazy changes while being tired and want to roll everything back to a particular point in time. This does not seem to be possible, right?

    Monday, January 28, 2008 10:55 PM
  • Sure there is, it's called restore from a    B a c k u p

     

     

     

    Tuesday, January 29, 2008 1:51 AM
  • BAK files are generated by ALTER TABLE in order to be able to roll back if an ALTER TABLE fails, as that is generating a new file and appending data behind the scenes. there are TBK and other backup files for other parts of the table.

     

    It's not intended to be your daily rollback version of the dbf. If you want to roll back to a certain point, you start a transaction, like in any other decent database.

     

    Tuesday, January 29, 2008 6:20 AM
  •  

    hai

     

    you can simply give

     

    sele a

    use customer.bak excl

    copy to customer.dbf

    sele a

    use

     

    sele a

    use customer

    brow

    Tuesday, January 29, 2008 7:38 AM
  • if you really want to be sure about backing up and restoring etc you should use source safe, or CVS, or whatever is your favourite version control
    Tuesday, January 29, 2008 9:59 PM