Subject Re: [firebird-support] Re: DB modified date is over a month old, but Forced Writes are ON??
Author Ann Harrison
On Wed, Jun 8, 2011 at 4:23 PM, Raymond <rschappe@...> wrote:
>
>
> Does this sound correct? I need to shutdown the database (leave FB running) with gfix, gbak backup, gbak restore, move to using the newly restored db
>
> gfix -sh -tr 300 scmaster
> gfix -sh -f 300 scmaster
>
> //backup db
> gbak -b -v -user sysdba -password ***** -y “D:\SCMaster\temp\SCMaster20110608_backup.logâ€
>  scmaster “D:\SCMaster\temp\SCMaster20110608.fbkâ€
>
> //restore db
> gbak -c -v -user sysdba -password ***** -y “D:\SCMaster\temp\SCMaster20110608_restore.logâ€
>  â€œD:\SCMaster\temp\SCMaster20110608.fbk† â€œD:\SCMaster\temp\SCMasterNew.fdbâ€
>
> copy, move, and delete old rotations of files as needed...
>
> Does this make sense? - or should I consider a different approach?


For most applications, I'd suggest a live backup each night, restoring
the backup once a week to a different file and location to insure that
there are no problems with the backup. Maybe once a year shutdown
before backing up, restore, and restart on the new file. There are some
performance problems that seem to be helped by a backup/restore
cycle, but most can be resolved more simply by making sure that
index statistics are up-to-date and garbage collection is forced
regularly. If there are performance problems, use the tools available
MON$ tables, gstat, plans, and sometimes lock print, rather than the
very blunt instrument of a backup/restore. Who knows, you might
uncover something that will make Firebird faster for everyone.

Good luck,

Ann