Re: [firebird-support] Confused about delta files [SOLVED]
No, sorry, I meant to say that every reference I have ever found has suggested the correct way to move a FB database from one machine to another is to simply copy the FDB file while the server is down. Oops, that's not good advice. Although this may be safe, it may also not be (depending on platform, possibility of embedded connections, etc.) It also requires you to stop the server, which may be a nuisance if there are also other databases in use. AFAIK, after a FULL shutdown you can also access the .fdb file on a file basis. So you don't have to stop the entire service. Regards Stefan
Re: [firebird-support] Confused about delta files [SOLVED]
Stefan Heymann wrote: It also requires you to stop the server, which may be a nuisance if there are also other databases in use. AFAIK, after a FULL shutdown you can also access the .fdb file on a file basis. So you don't have to stop the entire service. You're right; in Firebird 2.0 and up you can do a full shutdown, if necessary in combination with -force. Paul Vinkenoog
Re: [firebird-support] Confused about delta files [SOLVED]
On 2014-01-16, at 8:30 PM, Paul Vinkenoog wrote: In general, moving Firebird database files is a definite no-no. You copy or move Firebird databases by gbak'ing them and restoring them at the new location. Now *that's* interesting, because this has been the most suggested method I have seen. In fact, I only learned about the nbackup method long after having done two moves the other way, which was the recommended method from the vendor. I think maybe it would be a good idea to put this into the vendor's dox as well.
RE: [firebird-support] Confused about delta files [SOLVED]
In general, moving Firebird database files is a definite no-no. You copy or move Firebird databases by gbak'ing them and restoring them at the new location. What? Is there more to knowing that if you stop the fbserver, it's safe to copy an .fdb file than there is to know how to manipulate a database file under the control of nbackup? I think not Alan
Re: [firebird-support] Confused about delta files [SOLVED]
Alan McDonald wrote: In general, moving Firebird database files is a definite no-no. You copy or move Firebird databases by gbak'ing them and restoring them at the new location. What? Is there more to knowing that if you stop the fbserver, it's safe to copy an .fdb file than there is to know how to manipulate a database file under the control of nbackup? Sorry, I'm not sure what you mean by this (maybe because English isn't my first language). Of course it's safe to copy an .fdb if the server is down (and no embedded connections exist), but the standard mantra is use gbak, simply because this is *always* safe. Paul Vinkenoog
Re: [firebird-support] Confused about delta files [SOLVED]
Maury Markowitz wrote: In general, moving Firebird database files is a definite no-no. You copy or move Firebird databases by gbak'ing them and restoring them at the new location. Now *that's* interesting, because this has been the most suggested method I have seen. In fact, I only learned about the nbackup method long after having done two moves the other way, which was the recommended method from the vendor. That recommendation makes sense, especially since gbak has been around for a long time and is known to do its job. Nbackup is relatively new; it ought to be just as safe as gbak but in your case, something went wrong; the database wasn't unlocked and the .delta not re-integrated. Even then, the database kept functioning and I assume (and hope for you) that no data were corrupted. I think maybe it would be a good idea to put this into the vendor's dox as well. You mean the FishBowl docs? Or the Firebird docs? BTW, this nbackup scheme you used: did it come with Fishbowl or did you set it up yourself? Paul Vinkenoog
Re: [firebird-support] Confused about delta files [SOLVED]
On Fri, Jan 17, 2014 at 6:52 AM, Maury Markowitz mmarkow...@assolarinc.comwrote: Now *that's* interesting, because this has been the most suggested method I have seen. In fact, I only learned about the nbackup method long after having done two moves the other way, which was the recommended method from the vendor. Gbak is a backup/restore program that produces an architecture agnostic backup file. The backup file contains a logical representation of the format and contents of the database. Nbackup is a fast physical backup that supports incremental backups. Nbackup is not a database transport mechanism. If you found documentation that suggests using Nbackup as a transport, the Firebird Documentation group should know about it, because neither the database file nor the delta is architecture independent. Good luck, Ann
Re: [firebird-support] Confused about delta files [SOLVED]
On 2014-01-17, at 2:33 PM, Ann Harrison wrote: Gbak is a backup/restore program that produces an architecture agnostic backup file. The backup file contains a logical representation of the format and contents of the database. Nbackup is a fast physical backup that supports incremental backups. Nbackup is not a database transport mechanism. If you found documentation that suggests using Nbackup as a transport, the Firebird Documentation group should know about it, because neither the database file nor the delta is architecture independent. No, sorry, I meant to say that every reference I have ever found has suggested the correct way to move a FB database from one machine to another is to simply copy the FDB file while the server is down. However, in my case, the presence of the failed nbackup meant that the delta file it left behind also had to be copied. I'm actually surprised that simply copying both files actually solved the problem, but I suppose it did so because the original FDB had some sort of pointer to the existence of the delta. This is definitely *not* something that the documentation covers. Actually, from your post it would seem that the whole concept of simply coping the FDB is a bad idea anyway, and the proper solution would be to always use gbak?
RE: [firebird-support] Confused about delta files [SOLVED]
Paul, In general, moving Firebird database files is a definite no-no. You copy or move Firebird databases by gbak'ing them and restoring them at the new location. That is no longer true for most uses (as long as the engine has been stopped), it is true if moving across CPU platform/endian (ie x86/x64 to Sparc). You can move a db between x86/64 Windows and x86/64 Linux without any concern -- we do it all the time. Sean
Re: [firebird-support] Confused about delta files [SOLVED]
Maury Markowitz wrote: No, sorry, I meant to say that every reference I have ever found has suggested the correct way to move a FB database from one machine to another is to simply copy the FDB file while the server is down. Oops, that's not good advice. Although this may be safe, it may also not be (depending on platform, possibility of embedded connections, etc.) It also requires you to stop the server, which may be a nuisance if there are also other databases in use. Did you find this advice in any docs that came from the Firebird project itself? However, in my case, the presence of the failed nbackup meant that the delta file it left behind also had to be copied. I'm actually surprised that simply copying both files actually solved the problem, but I suppose it did so because the original FDB had some sort of pointer to the existence of the delta. This is definitely *not* something that the documentation covers. No, but it doesn't really need to. First, it is an implementation detail, and second, it goes without saying that if all modifications are sent to the delta, Firebird knows that if the main database is in nbak state, it also needs the delta. The default name is database file name.delta, but you can set another path + name in the database itself (and this is something that the manual *does* cover). Actually, from your post it would seem that the whole concept of simply coping the FDB is a bad idea anyway, and the proper solution would be to always use gbak? If in any doubt, use gbak. But as you can tell from Sean's post, there are situations where a straight file copy/move is just as safe. Just make sure you know what you are doing. Cheers, Paul Vinkenoog
Re: [firebird-support] Confused about delta files [SOLVED]
Whoa, this is interesting... My first attempt to move the DB was to simply copy over the FDB. That didn't work, so that's when I went down the nbackup rabbit hole. As it turns out, nbackup is the problem, not the solution... When I tried to re-attach the FDB file on the new server I got a file not found error. But looking in some of the logging files I found... Reason: I/O error for file CreateFile (open) D:\FISHBOWL\DATABASE\DATA\ASSOLAR.FDB.delta Error while trying to open file null A. Notice *which* file it can't find? Well then, perhaps if I copy BOTH files over... and it works! So basically it seems that the FDB file contains some sort of information that points to the delta. When you attempt to connect to a FDB in this state, it also looks for that delta file, and if it's not there, you get file not found. Makes sense in retrospect! I then used isql to ALTER DATABASE END BACKUP. This took about 15 seconds to run (impressive!), and successfully merged the delta back into the FDB. Everything is back to normal. Yay! This is definitely something that should be mentioned in the documentation! Is there a method for me to do the documentation change? I'm pretty good at that sort of thing. p.s. Now that I'm running, does anyone have any suggestions on any post-move maintenance I might want to do?
Re: [firebird-support] Confused about delta files [SOLVED]
Hello Maury, When I tried to re-attach the FDB file on the new server I got a file not found error. But looking in some of the logging files I found... Reason: I/O error for file CreateFile (open) D:\FISHBOWL\DATABASE\DATA\ASSOLAR.FDB.delta Error while trying to open file null A. Notice *which* file it can't find? Well then, perhaps if I copy BOTH files over... and it works! So basically it seems that the FDB file contains some sort of information that points to the delta. When you attempt to connect to a FDB in this state, it also looks for that delta file, and if it's not there, you get file not found. Makes sense in retrospect! Of course it needs the delta. As long as the backup state lasts, the main database file is frozen and all changes are written to the delta. That is, the .fdb and the .fdb.delta *together* form the database. I then used isql to ALTER DATABASE END BACKUP. This took about 15 seconds to run (impressive!), and successfully merged the delta back into the FDB. Everything is back to normal. Yay! Great! This is definitely something that should be mentioned in the documentation! What exactly are you missing in the documentation? Notice that delta files are normally very short-lived. If you use nbackup -b, the delta has disappeared when the command completes (and if something went wrong, there'll be an error message). And if you use nbackup -l, you are supposed to know what you are doing ;-) I daresay that if you had read the nbackup manual from beginning to end, you could have solved this problem yourself. (This is not criticism, BTW; this group is called firebird-SUPPORT for a reason.) Is there a method for me to do the documentation change? I'm pretty good at that sort of thing. If you want to propose changes to a manual, the preferred way is to submit them to the firebird-docs list (to subscribe, mail to firebird-docs-requ...@lists.sourceforge.net) People who write or update documentation regularly can get CVS access. Kind regards, Paul Vinkenoog
Re: [firebird-support] Confused about delta files [SOLVED]
On 2014-01-16, at 10:11 AM, Paul Vinkenoog wrote: What exactly are you missing in the documentation? Notice that delta files are normally very short-lived. That's the issue right there. As it is clearly possible that these are not *always* short lived, this should be mentioned along with suggestions on what to do. More specifically, there should be a mention in the sections on moving the databases that state that if a delta file is present, it must be moved as well. I daresay that if you had read the nbackup manual from beginning to end, I did. I saw no mention of copying FDB files - which I wouldn't expect. Did I miss something? you could have solved this problem yourself. Well, I did... If you want to propose changes to a manual, the preferred way is to submit them to the firebird-docs list (to subscribe, mail to firebird-docs-requ...@lists.sourceforge.net) Done.
Re: [firebird-support] Confused about delta files [SOLVED]
Maury Markowitz wrote: What exactly are you missing in the documentation? Notice that delta files are normally very short-lived. That's the issue right there. As it is clearly possible that these are not *always* short lived, this should be mentioned along with suggestions on what to do. That's right. Although your experience seems to be exceptional, it *did* happen and it may happen to others. So a warning in the nbackup manual would be in order. More specifically, there should be a mention in the sections on moving the databases that state that if a delta file is present, it must be moved as well. In general, moving Firebird database files is a definite no-no. You copy or move Firebird databases by gbak'ing them and restoring them at the new location. Including suggestions in the docs like if you move a Firebird database, check if there's a delta present and if so, move that too might give users the impression that moving database files around is a good idea. What's more, if there's a delta present, then the main .fdb file is usually locked - so it can be moved or copied without risk - but the delta is live, so it shouldn't be touched unless there's absolutely no other option. In the situation you described, the logical thing to do would have been ALTER DATABASE END BACKUP (or nbackup -N) on the original machine (once you found out the right credentials, which I believe you did). Cheers, Paul Vinkenoog