Restoring a backup made after “nbackup -L”
A copy of a locked database is itself a locked database too, so you can’t just copy it back and start using it.Should your original database get lost or damaged and the self-made copy needs to be restored (or should you wish to install the copy on another machine), proceed like this:
-
Copy/restore/unzip the backed-up database file yourself with the necessary tools.
-
Now unlock the database, not with the
-N(or-UN) switch, but with-F(fixup):nbackup -F database
Here too, you can optionally use an alias instead of a filename, and add
-Zfor version info.Other options make no sense.
Why are there two unlock switches, -N/-UN and -F?
-
-N/-UNfirst sees that any changes made since the locking by-Lare merged into the main database file.After that, the database goes back into normal read/write mode and the temporary file is deleted. -
-Fonly changes the state flag of the user-restored database to “normal”.
So you use:
-
-N/-UNafter having made a copy/backup yourself (to reverse the-Lissued earlier); -
-Fafter having restored such a backup yourself.
|
Note
|
The term fixup is used because it doesn’t attempt to reintegrate the delta-file, but only makes the minimum changes necessary to make the database file usable again. |