Subject Re: [firebird-support] Restore problem
Author Helen Borrie
At 02:33 AM 1/11/2005 +0800, Maurice Ling wrote:
>Hi,
>
>Can someone please tell me what is wrong with this command, I cannot get
>it working but I don't see the problem....
>
>zmling2:~/MyProjects/Muscorian/BioDatabases mauriceling$ gbak -c -R

Mutually exclusive switches - use either -c (preferable) or -R
(undesirable) but not both. Still, it looks as though gbak is ignoring one
of them, though, since it's reporting a later error.

>-user mouse -password mouse muscopedia.311005.1 muscopedia.311005.2
>muscopedia.fdb 2G

That's the wrong way to specify database file sizes - it's only valid in
-backup, for specifying backup file sizes. Needs to be an integer - the
number of PAGES. So, if you want to specify files with a 2 Gb limit,
divide (2 * 1024 * 1024 * 1024) by the page size in bytes and round DOWN to
an integer.

>muscopedia.fb2 2G muscopedia.fb3 2G muscopedia.fb4 2G
>muscopedia.fb5 2G muscopedia.fb6 2G muscopedia.fb7 2G muscopedia.fb8 2G
>muscopedia.fb9
>gbak: ERROR: size specification either missing or incorrect for file
>muscopedia.fdb
>gbak: Exiting before completion due to errors
>zmling2:~/MyProjects/Muscorian/BioDatabases mauriceling$


Also, if you are planning to do this in a batchfile, put in full path specs
for all files (both backup files and database files).

Tip: if you plan to do the wise thing and use the -c[reate_database]
switch to restore to a temporary location, you can use Ivan Prenosil's
glink tool to update the successfully recreated database's path links when
you copy it to the live location and replace the old db. Link for this
tool is www.ibphoenix.com/downloads/glink.zip

When doing this, remember that gbak runs inside a single snapshot
transaction, so the restored database won't contain any changes that were
done since the backup was started.

./heLen