Subject | Re: Problem with database size after the copy operation |
---|---|
Author | chsarvani |
Post date | 2007-10-10T12:33:59Z |
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@...> wrote:
The following are the details regarding the sizes of DB's.
DB1.fdb - 19,060 KB
DB2.fdb - 19,028 KB
DB3.fdb - 17,136 KB
DB4.fdb - 17,188 KB
The size of DB3 and DB4 differs.The size of DB4 is less than the size
of DB3.
Regards,
Sarvani
<iblist@...> wrote:
>the
> Helen Borrie wrote:
> > At 01:44 PM 10/10/2007, you wrote:
> >
> > This is incorrect. A file-copy of a database file is a copy of
> > on-disk image of the file at the time it is read by the file-copying
> > utility. The filesystem has has no knowledge of the meaning ofthe
> > contents of the database file. A file copy of a database willthe
> > contain all of the obsolete record versions that are present when
> > copy occurs.source
> >
> > It is not unusual for any active writable source file to be
> > fragmented. In creating the "snapshot image" of the file, the
> > operating system will gather up all of the fragments of the
> > file in preparation for copying to the destination. If the newcopy
> > is less fragmented than the source file, it would be expected tobe a
> > few bytes smaller than the source file, as is the case here.image of
> >
>
> :-)
>
> For sure Helen, I know a File system copy is just an identical
> the other file, but it's not the case, he is using Milan's *fbcopy*backup
>
> >
> >> try backin-up and restore both and you will see the same size.
> >>
> >
> > Also not correct. If you back up a database using Firebird's
> > utility (gbak, or its equivalent in Service Manager), thenrestoring
> > that backup will always produce a smaller database. This *is*the
> > condition where obsolete record versions are not transported.The
> > restore also eliminates "spare" blocks of space and writes toexactly
> > the number of blocks needed to accommodate the database and itsdata.
> >any
> > You should not use file-copying utilities to back up or duplicate
> > database. Always use the internal tools.and
> >
>
> Helen, I think my english is much worse than I expected :-)
>
> He has a database, let's call it DB1
>
> Then he uses FBCOPY to create a new database (let's call it DB2)
>
> DB2 is smaller than DB1 (since it has no obsolete record versions
> other data that has no meaning in a newly created and populateddatabase)
>greater
> What I suggested him to do is:
>
> gbak DB1.fdb DB1.fbk -user sysdba -password masterkey
> gbak DB1.fbk DB3.fdb -c -user sysdba -password masterkey
>
> then
>
> gbak DB2.fdb DB2.fbk -user sysdba -password masterkey
> gbak DB2.fbk DB4.fdb -c -user sysdba -password masterkey
>
> DB3.fdb and DB4.fdb should have the same size even if DB1.fdb is
> than DB2.fdb.I have checked the scenario.
>
> hope, it's clear now.
>
> > ./heLen
> >
> >
>
>
> see you !
>
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>
The following are the details regarding the sizes of DB's.
DB1.fdb - 19,060 KB
DB2.fdb - 19,028 KB
DB3.fdb - 17,136 KB
DB4.fdb - 17,188 KB
The size of DB3 and DB4 differs.The size of DB4 is less than the size
of DB3.
Regards,
Sarvani