Subject | Re: Restore problem |
---|---|
Author | Maurice Ling |
Post date | 2005-11-01T03:08:33Z |
Hi Helen,
Thanks for the pointers. This works:
zmling2:~/MyProjects/Muscorian/BioDatabases mauriceling$ gbak -R -user
mouse -password mouse muscopedia.311005.1 muscopedia.311005.2
muscopedia.fdb 500000 muscopedia.fd2 500000 muscopedia.fd3 500000
muscopedia.fd4 500000 muscopedia.fd5 500000 muscopedia.fd6 500000
muscopedia.fd7 500000 muscopedia.fd8 500000 muscopedia.fd9
In my SQL that creates the database, I've specified the page size to
be 4096, so gbak somehow reads that page size and multiply it by
500000 to give a max file size of 2GB?
My database creation DDLs are as follows:
create database 'muscopedia.fdb'
user 'mouse' password 'mouse'
page_size 4096
length 500000;
alter database add file 'muscopedia.fb2' starting at page 500001
length 500000;
alter database add file 'muscopedia.fb3' starting at page 1000001
length 500000;
alter database add file 'muscopedia.fb4' starting at page 1500001
length 500000;
alter database add file 'muscopedia.fb5' starting at page 2000001
length 500000;
alter database add file 'muscopedia.fb6' starting at page 2500001
length 500000;
alter database add file 'muscopedia.fb7' starting at page 3000001
length 500000;
alter database add file 'muscopedia.fb8' starting at page 3500001
length 500000;
alter database add file 'muscopedia.fb9' starting at page 4000001
length 500000;
commit;
Also Helen, why is -C[reate database] more desirable than -R[estore]
switch?
Thanks
Maurice
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
Thanks for the pointers. This works:
zmling2:~/MyProjects/Muscorian/BioDatabases mauriceling$ gbak -R -user
mouse -password mouse muscopedia.311005.1 muscopedia.311005.2
muscopedia.fdb 500000 muscopedia.fd2 500000 muscopedia.fd3 500000
muscopedia.fd4 500000 muscopedia.fd5 500000 muscopedia.fd6 500000
muscopedia.fd7 500000 muscopedia.fd8 500000 muscopedia.fd9
In my SQL that creates the database, I've specified the page size to
be 4096, so gbak somehow reads that page size and multiply it by
500000 to give a max file size of 2GB?
My database creation DDLs are as follows:
create database 'muscopedia.fdb'
user 'mouse' password 'mouse'
page_size 4096
length 500000;
alter database add file 'muscopedia.fb2' starting at page 500001
length 500000;
alter database add file 'muscopedia.fb3' starting at page 1000001
length 500000;
alter database add file 'muscopedia.fb4' starting at page 1500001
length 500000;
alter database add file 'muscopedia.fb5' starting at page 2000001
length 500000;
alter database add file 'muscopedia.fb6' starting at page 2500001
length 500000;
alter database add file 'muscopedia.fb7' starting at page 3000001
length 500000;
alter database add file 'muscopedia.fb8' starting at page 3500001
length 500000;
alter database add file 'muscopedia.fb9' starting at page 4000001
length 500000;
commit;
Also Helen, why is -C[reate database] more desirable than -R[estore]
switch?
Thanks
Maurice
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
>cannot get
> At 02:33 AM 1/11/2005 +0800, Maurice Ling wrote:
> >Hi,
> >
> >Can someone please tell me what is wrong with this command, I
> >it working but I don't see the problem....ignoring one
> >
> >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
> of them, though, since it's reporting a later error.valid in
>
> >-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
> -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,DOWN to
> divide (2 * 1024 * 1024 * 1024) by the page size in bytes and round
> an integer.path specs
>
> >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
> for all files (both backup files and database files).links when
>
> 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
> you copy it to the live location and replace the old db. Link for thiswere
> 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
> done since the backup was started.
>
> ./heLen
>