Show/Hide Toolbars

Filopto Help Manual

 

 

 

For Users that have their own Backup tool or wish to create their own backup scheduler for Filopto, following are instructions on how to use the built-in backup tool for Firebird called GBAK.

 

 

Create a Backup using Windows Task Scheduler

 

1. Go into the Start Menu

 

2. Click on Control Panel

 

3. If the Control Panel is displayed in the Windows Category View, pick(by clicking on) the "Performance and Maintenance" category, then pick "Scheduled Tasks".   Otherwise, if the Control Panel is displayed in Windows Classic View, double-click on "Scheduled Tasks".

 

4. Double-click on "Add Scheduled Task".

 

5. Click on "Next".

 

6. Click on "Browse".

 

7. Go to the folder "C:\Program Files\Firebirdx.x\bin".  

 

8. Select GBAK, then click on "Open".

 

9. Enter the desired task name(i.e.: Filopto Backup), and select the frequency you want the backup to be performed(i.e.: Daily), then click Next.

 

10. Select at what time of the day you want it to start (preferably 1 to 2 hours prior to the system overall tape backup schedule).

 

11. Click on Next.

 

12. Enter the user name and password under which the Filopto database backup will run(preferably use the Administrator user name and password)

 

13. Click on Next.

 

14. Place a check mark beside "Open advanced properties for this task when I click Finish."

 

15. Click on Finish.

 

16. In the "Run" edit box, add at the end the following:

 

-b -user SYSDBA -password masterkey localhost:Filopto9 "C:\program files\filopto9\data\FILOPTO.FBK"

(where C: is the drive where Filopto is installed and Filopto.fbk is the backed up database file)

 

17. Click on Apply.

 

18. Click on OK.

 

Now, the Filopto database will be backed-up on a regular basis.  

 

 

 

IMPORTANT:

 

If you are using an automated backup tool such as a tape backup program, make certain that you first shutdown all Filopto programs and the Firebird engine before doing the backup or you may cause corruption in the database.  

 


 

GBAK is Firebird's command line tool for online backup and restore of a complete database.

GBAK is able to perform a backup while the database is running. There is no need to shut down the database during a GBAK backup. GBAK will create a consistent snapshot of the database at the time it starts running. You will, however, notice a performance degradation during the backup, so it is a good idea to backup at night.  GBAK visits all pages of the database, so it will also perform a garbage collection on the database at the same time.

General Syntax

gbak <options> -user <username> -password <password> <source> <destination>

 

Backup

For backups, <source> is the database you want to back up, <destination> is the file name of the backup file. The usual extension for the backup file is .fbk for Firebird and .gbk for InterBase.

Only SYSDBA or the database owner can perform a backup. For mufti-file databases, specify only the name of the first file as the database name.

Restore

For restores, <source> is the backup file and <destination> is the name of the database that is to be built up from the backup file. You will have to specify the -C option for restore.

General Options

-no_dbtriggers

Suppresses Database Triggers from running [Firebird 2.1]

-pa[ssword] <password>

Database password

-role <role>

Connect as role

-se[rvice]

<hostname>:service_mgr

Backup: Creates the backup file on the database server, using the Service Manager.

Restore: Creates the database from a backup file on the server, using the Service Manager.

-u[ser] <username>

Database user name

-v[erbose]

Verbose output of what GBAK is doing

-y <filename>

Redirect all output messages to <filename>

The file must not exist before running GBAK!

-y suppress_output

Quiet mode

-z

Show GBAK version and server version

 

Backup Options

-b[ackup_database]        

Back up. This switch is optional.

-co[nvert]

Converts external tables to internal tables

-e[xpand]

Creates an uncompressed backup

-fa[ctor] n

Blocking factor for tape device

-g[arbage collect]

Does not perform garbage collection (sweeping) during backup

-ig[nore]

Ignores checksum errors while backing up

-l[imbo]

Ignores limbo transactions while backing up

-m[etadata]

Only backs up metadata (schema). No table data will be stored.

-nt

Non-transportable format (use only when you know you will restore on same platform and database version)

-t[ransportable]

Creates a transportable backup (transportable between platforms and server versions)

 

Restore Options

-bu[ffers]

Set cache size for restored database

-c[reate_database]

Restore to a new database (the target database file MUST NOT exist)

-i[nactive]

All indexes will be restored as INACTIVE

-k[ill]

Does not create shadows that are defined in the backup

-mo[de] read_write

Restores to a read/write database (This is the default)

-mo[de] read_only

Restores to a read-only database

-n[o_validity]

Does not restore validity constraints. So you can restore data that does not meet these constraints and could not be restored otherwise.

-o[ne_at_a_time]

Restores one table at a time. You can use this to partially restore databases with corrupt table data

-p[age_size] <size>

Sets page size of new database. <size> can be one of 1024, 2048, 4096, 8192. Default is 1024.

-r[eplace_database]

Restores over an existing database. This can only be performed by SYSDBA or the owner of the database that is overwritten. Do NOT restore over a database that is in use! [Firebird 1.0, 1.5]

-rep[lace_database]

New abbreviation for the old -replace_database [Firebird 2.0]

-r[ecreate_database] o[verwrite]

[Firebird 2.0] Restores over an existing database. This can only be performed by SYSDBA or the owner of the database that is overwritten. Do NOT restore over a database that is in use!

-r is equivalent to -c. Only the "overwrite" option will restore over an existing database.

-use_[all_space]

Normally, on restore, database pages will be filled to about 80 %. With the use_all_space option, database pages will be filled to 100 %. (Useful for read-only databases which will see no more modifications.)

 

Examples

A "normal" Backup

gbak -v -t -user SYSDBA -password "masterkey" dbserver:c:/ProgramData/Filopto10/data/Filopto.fdb c:\backups\Filopto.fbk

 

Backup with output to a logfile

del c:\backups\warehouse.log

gbak -v -t -user SYSDBA -password masterkey -y c:\backups\FiloptoBackup.log dbserver:c:/ProgramData/filopto10/data/Filopto.fdb c:\backups\Filopto.fbk

 

A "normal" Restore

gbak -c -v -user SYSDBA -password masterkey c:\backups\Filopto.fbk dbserver:c:/ProgramData/filopto10/data/Filopto.fdb

 

Syntax for backup

gbak [options] <database> <target file 1> <size 1> <target file 2> <size 2> ... <target file n>

NOTE: Do not specify a size for the last file. It will always be filled to take up what is left over, no matter how large.

Size can be given in bytes (8192), kilobytes (1024k), megabytes (5m), or gigabytes (2g)

 

Syntax for restore

gbak -c [options] <source file 1> <source file 2> ... <source file n> <database>