Gbak error requires both input and output filenames

iBase.ru Forum Форум по InterBase, Firebird и Yaffil Темы без ответов Активные темы Поиск Наша команда gbak: ERROR: size specification either missing or incorrect gbak: ERROR: size specification either missing or incorrect Сообщение smplmnd » 14 июн 2007, 10:12 Re: gbak: ERROR: size specification either missing or incorr Сообщение stix-s » 14 июн 2007, […]

Содержание

  1. iBase.ru Forum
  2. gbak: ERROR: size specification either missing or incorrect
  3. gbak: ERROR: size specification either missing or incorrect
  4. Re: gbak: ERROR: size specification either missing or incorr
  5. Re: gbak: ERROR: size specification either missing or incorr
  6. Re: gbak: ERROR: size specification either missing or incorr
  7. Re: gbak: ERROR: size specification either missing or incorr
  8. Firebird Backup & Restore Utility
  9. 1. Introduction
  10. 2. Command-line Options
  11. 2.1. Common Options
  12. 2.2. Backup Switches
  13. 2.3. Restore Switches
  14. 3. Backup Mode
  15. 3.1. Speeding up the Backup
  16. 4. Restore Mode
  17. 4.1. Restore Or Recreate?
  18. 4.2. Malformed String Errors During Restores
  19. 4.3. Speeding up the Restore
  20. 5. Security Of Backups
  21. 6. Backup & Restore Recipes
  22. 6.1. Backup & Restore Prerequisites
  23. 6.2. A Simple Backup & Restore
  24. 6.3. Metadata Only
  25. 6.4. Splitting The Backup
  26. 6.5. Change The ODS
  27. 6.6. Change The Cache Size
  28. 6.7. Change The Page Size
  29. 6.8. Create A Read-Only Database Clone
  30. 6.9. Create a Database Clone Without a Dump File.
  31. 6.10. Backup & Restore With & Without Shadow Files.
  32. 6.11. Remote Backups & Restores
  33. 6.12. Remote Backups and Restores Using SSH
  34. 6.13. Using External Tools
  35. 7. Gbak Caveats
  36. 7.1. Gbak Default Mode
  37. 7.2. Normal Versus Privileged Users
  38. 7.3. Silent Running?
  39. 7.4. Gbak log file Cannot Be Overwritten
  40. 7.5. Use of ‘stdin’ or ‘stdout’ File Names
  41. Appendix A: Document history
  42. Appendix B: License notice

iBase.ru Forum

Форум по InterBase, Firebird и Yaffil

  • Темы без ответов
  • Активные темы
  • Поиск
  • Наша команда

gbak: ERROR: size specification either missing or incorrect

gbak: ERROR: size specification either missing or incorrect

Сообщение smplmnd » 14 июн 2007, 10:12

Re: gbak: ERROR: size specification either missing or incorr

Сообщение stix-s » 14 июн 2007, 11:27

Re: gbak: ERROR: size specification either missing or incorr

Сообщение smplmnd » 14 июн 2007, 11:37

Re: gbak: ERROR: size specification either missing or incorr

Сообщение stix-s » 14 июн 2007, 11:40

Сообщение Merlin » 14 июн 2007, 12:10

Есть такое мнение, что не исключено, что в Operations Guide слова

For restoring:
gbak <-C|-R>[options] source dbfile

написаны не просто так.

Re: gbak: ERROR: size specification either missing or incorr

Сообщение smplmnd » 14 июн 2007, 12:22

Merlin писал(а): Есть такое мнение, что не исключено, что в Operations Guide слова

For restoring:
gbak <-C|-R>[options] source dbfile

написаны не просто так.

Сообщение WildSery » 14 июн 2007, 12:23

Сообщение smplmnd » 14 июн 2007, 13:19

Сообщение Merlin » 14 июн 2007, 13:33

Сообщение smplmnd » 14 июн 2007, 13:53

Сообщение Merlin » 14 июн 2007, 14:06

Сообщение smplmnd » 14 июн 2007, 14:33

Сообщение Кузнецов Евгений » 14 июн 2007, 14:57

Доброго времени суток!

Насколько я видел исходники FB, обработка параметров там производиться следующим образом:
есть таблица полных имен ключей в верхнем регистре
смотрим ключи в командной строке — если есть совпадение с началом полного имени ключа без учета регистра — считаем, что это искомый ключ. Т.е. вместо -password можно написать -pa, -pas и т.д.
Видимо, при различном порядке записи ключей могут возникнуть накладки: -P может распознаться как -password. Мораль — не лениться и указывать наименования ключей так, чтобы толкование было однозначным — -user, -password, -page.

Сообщение Merlin » 14 июн 2007, 14:59

Сообщение Кузнецов Евгений » 14 июн 2007, 15:07

Источник

Firebird Backup & Restore Utility

1. Introduction

Gbak is one of the database backup and restore utilities supplied with Firebird. In Firebird 1.5 it is the only supplied utility of this kind while Firebird 2.x also has the nbackup utility which is described in another document.

In this manual, we will discuss:

Command-line options for gbak .

gbak commands and their parameters.

Running gbak in backup or restore modes.

Some caveats, gotchas and foibles of gbak .

2. Command-line Options

2.1. Common Options

When running gbak in backup or restore mode, there are a number of options which apply to either mode. These are:

This switch displays the command line options and switches. It replaces the old method in which you had to supply an invalid switch (see -help below) in order to see the list of valid ones.

This switch causes the password for the appropriate user to be read from a file as opposed to being specified on the command line. The file name supplied is not in quotes and must be readable by the user running gbak . If the file name is specified as stdin , then the user will be prompted for a password. On POSIX systems, the file name /dev/tty will also result in a prompt for the password.

This switch causes your data to be ignored and not backed up or restored. In a backup, only the database meta data are backed up. When used in a restore, any data in the dump file will not be restored. This switch can be used when creating database clones which are required to contain only the tables , indices etc but none of the data.

Supplies the password for the username specified above. This need not be supplied if ISC_PASSWORD environment variable exists and has the correct value.

Allows the specification of the role to be used by the connecting user. Not of much practical use and is not normally used in practice.

Allows the username of the SYSDBA or database owner user to be specified if the database is to be backed up, or, in the case of a restore (with the -c[reate] switch specified), any valid username can be specified. This need not be supplied if ISC_USER environment variable exists and has a correct value for the username.

Databases can only be backed up by SYSDBA or the database owner. A restore can also be carried out by SYSDBA or the database owner, however, if the -c(reate) switch is used, any validated username can create a new database from a backup file.

Normally gbak operates quietly with no information written to the display. This switch reverses that situation and causes lots of information to be displayed. The default is to display the output to the screen, but you can redirect the output to a log file using the -y switch.

-Y or the text «suppress»

Used in conjunction with the -v[erify] switch to redirect status messages to a file or device, rather than the screen, or to suppress them altogether.

If -y suppress is used, then no information will be written to screen regardless of whether -v[erify] is specified.

If a filename is given and the -v[erify] switch is specified, the file will be written to record progress, errors etc.

All known documentation on this switch mentions that the text should be «suppress_output» rather than «suppress» . This is an error in the documentation as the source code for gbak shows that the switch must be «suppress» .

The log file must not exist. If it does, the backup or recovery operation will fail:

This option displays some information about the version of gbak being used, and optionally, a database. To obtain the version of gbak only, run the command as follows:

This displays the current version of gbak , and after displaying a couple of error messages, exits with an error code of 1 as shown above by the echo command. This method does not attempt to backup any databases and does not require a username and password to be defined or supplied.

If you wish to display the version number of the gbak utility and also details of database, you must supply a valid database name and backup filename, as follows:

You will note from the above that a valid username and password must be defined on the command line, or by the use of environment variables ISC_USER and ISC_PASSWORD . This version of the command will exit with a error code of zero.

This method of calling gbak will make a backup of the database. If your database is large, this can take some time to complete and the backup file specified will be overwritten if it already exists. Beware.

The output above has been slightly abbreviated to allow it to fit the page width for a pdf.

Help is actually not a valid option, but can be used to display the following screen of information as output from gbak in Firebird 2.0:

The explanation of the -m[eta_data] switch implies that it is useful in a backup situation only. This is not the case as it can also be used on a restore.

From Firebird 2.5 onwards, there is a new -? switch to display the list of valid options. The output has slightly different layout and a couple of new options have been added:

The parentheses shown in the above indicates how much of the switch name you need to use in order to avoid ambiguity. Once you have specified the absolute minimum — the part before the opening ‘[‘ — you can use as much of what follows as you wish. For example, to use the -b[ackup_database] switch the minimum you must supply on the command line is -b but anything between -b and -backup_database will be accepted.

Using the -help switch like this, or any other invalid switch, will cause gbak to exit with an error code of 1 on Linux and Windows.

2.2. Backup Switches

When running gbak , if the first filename is a database name, or database alias then gbak will default to taking a backup of the database in transportable format. The backup file will be named as per the second file name supplied on the command line.

You may, if you wish, send the output to standard output rather than a backup file. In this case, you must specify stdout as the dump file name. This is not really of much use, unless you wish to pipe the dump through a tool to modify it in some way. You can pipe the output directly to a gbak restore operation to clone a database without needing an intermediate dump file. An example is given later in this manual.

When carrying out a backup of a database, the following switches, in addition to the common ones above, will be of use:

This switch is used whenever you wish to take a backup of a database.

This switch causes any tables, defined as external , to be backed up as if they were normal (non-external) tables. When this dump file is used to restore a database, the tables that were external in the original database will no longer be external.

Normally, gbak will compress the output file. This switch prevents that compression from taking place.

If backing up to a physical tape device, this switch lets you specify the tape’s blocking factor.

The use of this switch prevents Firebird’s garbage collection from taking place while gbak is running. Normally gbak connects to the database as any other connection would and garbage collection runs normally. Using this switch prevents garbage collection from running during the course of the backup. This can help speed up the backup.

This switch causes gbak to ignore bad checksums in the database. This can be used to attempt to backup a database that failed due to checksum errors. There is no guarantee that the data will be usable though, so it is best to take other precautions to preserve your data.

If you have a two-phase transaction (across two different databases) that failed because a server died before the commit, but after the changes were made, you have a limbo transaction. This switch forces the backup to ignore data from such broken transactions. It should not be used for normal backups and only used, like the -ig[nore] switch to attempt to recover from a failure.

This switch turns off the -t[ransportable] switch (which is on by default) and causes the dump file to be created using platform dependent formats. If you use this switch to create a backup then you can only restore the backup on a similar platform. You cannot, for example, take a dump file from Linux over to a Windows server.

This switch is unlikely to be used. It has been deprecated. Its purpose is to force the backup to be made using the older InterBase versions’ format of meta data descriptions.

This switch causes gbak to backup a remote database via the service manager. This causes the backup file to be created on the remote server, so the path format and filename must be valid on the remote server. The servicename is currently always the text service_mgr .

You can use this option to connect to a locally hosted database as well. If you do, taking a backup using this option can run quicker than accessing the database directly. See the section below on speeding up backups.

The default dump file format is transportable. Transportable backup files are written in a format known as external data representation (XDR) format and it is this format which allows a dump taken on a server of one type to be successfully restored on a server of another type.

-Y or the text «suppress»

2.3. Restore Switches

When running a gbak command, if the first filename is a database backup file name then gbak will default to running a recovery of the database provided that you specify one of -c[create database] , -rep[lace_database] or -r[ecreate_database] in order to make your intentions clear. The database will be restored to whatever file name is specified as the second file name on the command line.

You may, if you wish, read the dump data directly from standard input rather than a backup file. In this case, you must specify stdin as the dump file name. You could pipe a gbak dump operation directly to a gbak restore operation to clone a database without needing an intermediate dump file. An example is given later in this manual.

When carrying out a restore or replacement of a database, the following switches, in addition to the common ones above, will be of use:

This switch sets the default database cache size (in number of database pages) for the database being restored. If a database is being overwritten then this setting will overwrite the previous setting for the cache size.

This switch causes a new database to be created from the backup file. The database file must not exist or the restore will fail. Either this switch or -rep[lace_database] or -r[ecreate_database] must be specified.

This switch forces gbak to fix malformed UNICODE_FSS character data during a restore.

This switch, and the following one, should not be required under normal circumstances. However, if a restore operation fails with a «malformed string» error, the message output from gbak will refer the user to one or both of these switches to fix the malformed UNICODE_FSS data or meta data as appropriate.

This switch forces gbak to fix malformed UNICODE_FSS metadata during a restore.

This switch, and the preceding one, should not be required under normal circumstances. However, if a restore operation fails with a «malformed string» error, the message output from gbak will refer the user to one or both of these switches to fix the malformed UNICODE_FSS data or meta data as appropriate.

This switch can be used to restore a database when a previous restore attempt failed due to index errors. All indexes in the restored database will be inactive.

This switch restores the database but doesn’t recreate any shadow files that existed previously.

This switch allows the database being restored to be set to the given access mode when opened. By default, the mode is taken from the database that was dumped.

This switch is similar to the -i[nactive] switch above, except, it disabled all check constraints in the restored database.

New switch from Firebird 2.1 which prevents the database triggers from firing on a restore. Database triggers are a new feature in Firebird 2.0 onwards and are different from table triggers which will continue to fire.

This switch causes the restore to restore one table at a time. This can be useful when a previous restore failed due to data errors. Normally, a restore takes place in a single transaction with a single commit at the end of the restore. If the restore is interrupted for any reason, an empty database is the end result. Using the -o[ne_at_a_time] option uses a transaction for each table and commits after each table has been restored.

Use this switch to change the default database page size. By default, the database is restored using a page size the same as the one that was in use when the database was dumped.

New from Firebird 2.x. Create (or replace if o[verwrite] is used) the named database from the backup file. The database filename should not already exist or an error will occur. This is not the case if the o[verwrite] option is also used.

This is a new switch and is deliberately abbreviated to -r to try to prevent unsuspecting DBAs from overwriting an existing database thinking that the -r was abbreviated from -restore . Now, it takes special effort to manage this especially as -restore was never actually a valid switch; -r was in fact an abbreviation of -replace_database and it did this by first deleting the existing database file and then recreating it from the backup.

Using -r[ecreate_database] o[verwrite] is effectively the same as using -rep[lace_database] .

Replace database from backup file. This switch used to be abbreviated to -r in previous (to Firebird 2.x) versions. This switch will be removed in a version of Firebird later than 2.1.3 (where it still exists). You are advised to use the -r[ecreate_database] o[verwrite] switch instead.

Use the services manager on a remote database to restore a remote database. The servicename is currently always the text service_mgr .

You can use this option to connect to a locally hosted database as well. If you do, restoring a backup using this option can run quicker than accessing the database directly. See the section below on speeding up restores.

This switch forces the restore to use 100% of each database page and thus not leave any room for changes. If you omit this switch, some space will be kept free for subsequent changes. Using this switch is likely to be only of practical use where the database is created and used in read-only mode and no updates to existing data are required.

Once a database has been restored with this option specified, all database pages will be filled to 100% and no free space will be left for updates. Use of this switch set a flag in the database header page to signal that all pages are to be filled to 100% — this applies to any new pages created after the restore.

You can override this setting, using gfix -use full | reserve database_name where full uses 100% of each page and reserve reserves some space for subsequent updates. See the gfix manual for more details.

3. Backup Mode

Before you consider using other tools to take a backup of your Firebird database, make sure that you know what the tools do and how a running database will be affected by them. For example, if you use Winzip to create a compressed copy of a database and you do it when users are accessing the system, the chances of a successful restore of that database are slim. You must either always use the gbak or nbackup tools which know how the database works, or, use gfix to shut the database down completely before you even attempt to backup the database file(s).

Gbak creates a consistent backup of the database by starting a transaction that spans the backup period. When the backup is complete, the transaction is ended and this means that the backup process can be run while users are working in the database. However, any transactions started after the backup process begins will not have any of the changed data written to the backup file. The backup will represent a copy of the entire database at the moment the backup began.

The dump file created by a default gbak backup is cross platform (transportable) so a backup taken on a Windows server can be used to recreate the same database on a Linux server, or on any other platform supported by Firebird. This is not true of the copies of your database taken (while the database was closed!) with tools such as Winzip etc. Those copies should only ever be used to restore a database on the same platform as the one copied.

Always backup the database with the version of gbak supplied with the running database server.

And one final thought on backups, regardless of the fact that the backup finished with no errors, exited with an error code of zero and all appears to be well, how do you actually know that the backup file created is usable? The short answer is, you don’t. Whenever you have a valuable database — and they all should be — you are strongly advised to take your backup files and use them to create a test restore of a database either on the same server or even better, on a different one. Only by doing this can you be certain of a successful backup.

The following example shows a backup being taken on a server named linux and used to create a clone of the database on another Linux server named tux to make sure that all was well. First of all, the backup on linux:

Note that the above gbak command can be written as follows, leaving out the -b[ackup] switch as gbak defaults to running a backup when no other suitable switches are specified:

Then, on the tux server:

At this point, the restore has worked and has overwritten the previous database known as employee.restore.test .

The actual location of the database for the database employee.restore.test is defined in the aliases.conf file in /opt/firebird on the server. In this test, it resolves to /opt/firebird/databases/employee.restore.fdb .

For further proof of reliability, the application may be tested against this clone of the live database to ensure all is well.

3.1. Speeding up the Backup

There are a couple of tricks you can use to speed up the backup. The first is to prevent the garbage collection from being carried out while the backup is running. Garbage collection clears out old record versions that are no longer required and this is usually covered by a sweep — manual or automatic — or by a full table scan of any affected table. As gbak accesses all the rows in the tables being backed up, it too will trigger the garbage collection and, if there have been a large number of updates, can slow down the backup. To prevent garbage collection during the backup, use the -g[arbage_collect] option.

The second option is to backup the database using the -se[rvice] option. Although this is used to perform remote backups, it can be used locally as well. Using this option can help speed up your backups. It simply avoids the data being copied over the TCP network which can slow down the actions of the backup.

The example above backs up the employee database, on the tux server, «remotely» using the service manager. The tux server is, of course, where the command is running, so it isn’t really running remotely at all.

You can, of course, combine the -g[arbage_collect] and -se[rvice] options.

4. Restore Mode

Backups taken with the gbak application from one version of Firebird — or InterBase — can be used by later versions of Firebird to restore the database, however, while this may result in an upgrade to the On Disc Structure (ODS) for the database in question, the SQL Dialect will never be changed. If you backup an InterBase dialect 1 database and then use the dump file to recreate it under Firebird 2.1, for example, the ODS will be updated to 11.1 but the SQL Dialect will remain as 1.

Always restore the database with the version of gbak supplied with the database server you wish to run the (new) database under. However, gbak from Firebird 2.1 can be used to restore a database onto any version of Firebird.

You can, if you wish, change the SQL Dialect using gfix .

Under normal circumstances, restoring a database takes place as a single transaction. If the restore is successful, a commit at the end makes the data permanent, if not, the database will be empty at the end.

The restore option -o[ne_at_a_time] will use a transaction for each table and if the table is restored with no errors, a commit is executed rendering that table permanent regardless of what happens with subsequent tables.

4.1. Restore Or Recreate?

Should a database be restored or replaced? Restoring a database is the process by which you take the existing file and delete prior to replacing it on disc with a backup copy. Gbak does this when you specify the -r[ecreate_database] o[verwrite] switch or the -rep[lace_database] switch. What is the difference?

If a database exists on disc and you ask gbak to restore it using one of the two switches above, you might corrupt the database especially if the database is in use and has not been shut down using gfix . In addition, if you have only partially completed the restore of a database, and some users decide to see if they can login, the database may well be corrupted.

Finally, if the restore process discovers that the dump file is corrupt, the restore will fail and your previously working database will be gone forever.

It can be seen that restoring a database can be a fraught experience.

For security, always recreate the database with a new name — a clone — and update the aliases.conf to reflect the new name. This way, your users will always refer to the database by the alias regardless of the actual filename on the server.

4.2. Malformed String Errors During Restores

During a restore operation, most likely when restoring a backup taken using an older gbak version, it is possible to see failure messages, in gbak ‘s output, indicating malformed Unicode strings. The reason that these may occur is as explained by Helen Borrie:

The source text of stored procedures (and several other types of object, such as CHECK constraints) is stored in a blob, as is the «compiled» BLR code. When you restore a database, the BLR is not recreated: the same BLR is used until next time you recreate or alter the object.

Historically, the engine did not do the right thing regarding the transliteration of strings embedded in the source and the BLR. In v.2.1 and 2.5 a lot of work was done to address the international language issues, as you probably know. A side effect of this was that everything that was read from data and meta data became subject to «well-formedness» checks. Hence, on restoring, those previously stored source and BLR objects are throwing «malformed string» errors when gbak tries to read and write the data in these system table records. This very old bug affects user blobs, too, if they have been stored using character set NONE and the client is configured to read a specified character set to which the stored data could not be transliterated.

In v.2.1 there were scripts in ../misc that you could run to repair the meta data blobs and also use as a template for repairing the similar errors in blobs in your user data. The repair switches were added to the gbak restore code in v.2.5 to do the same corrections to meta data and data, respectively, during the process of restoring a database for upgrade.

4.3. Speeding up the Restore

The restoration of a database, from a backup, can be made to execute quicker if the -se[rvice] option is used. Although this is used to perform remote restores, it can be used locally as well. It simply avoids the data being copied over the TCP network which can slow down the actions of the restore.

The example above backs up the employee database, on the tux server, «remotely» using the service manager. The tux server is, of course, where the command is running, so it isn’t really running remotely at all.

You can, of course, combine the -g[arbage_collect] and -se[rvice] options.

5. Security Of Backups

As you have seen above anyone, with a valid username and password, can restore a gbak database dump file provided that they are not overwriting an existing database. This means that your precious data can be stolen and used by nefarious characters on their own servers, to create a copy of your database and see what your sales figures, for example, are like.

To try and prevent this from happening, you are advised to take precautions. You should also try and prevent backups from being accidentally overwritten before they have expired. Some precautions you can take are:

Always set the dump file to be read-only after the backup is complete. This helps prevent the file from being overwritten.

Alternatively, incorporate the date (and time?) in your backup filenames.

Keep backups in a safe location on the server. Storing backups in a location with restricted access helps reduce the chances of your backup files ‘escaping’ into the wild.

Keep tape copies of your backups very secure. A locked safe or off-site location with good security is advisable. The off-site location will also be of use after a total disaster as the backups are stored in a separate location to the server they are required on.

Backup to a partition or disc that has encryption enabled.

Make sure that only authorised staff have access to areas where backups are kept.

Always test your backups by cloning a database from a recent backup.

In Firebird 2.1, there is an additional security feature built into gbak and all the other command-line utilities. This new feature automatically hides the password if it is supplied on the command line using the -password switch. Gbak replaces the password with spaces — one for each character in the password. This prevents other users on the system, who could run the ps command and view your command line and parameters, from viewing any supplied password. In this manner, unauthorised users are unable to obtain the supplied password.

You can see from the above that the password doesn’t show up under Firebird 2.1 as each character is replaced by a single space. This does mean that it is possible for someone to work out how long the password could be and that might be enough of a clue to a dedicated cracker. Knowing the length of the required password does make things a little easier, so for best results use a random number of spaces between -passw and the actual password. The more difficult you make things for the bad people on your network, the better.

6. Backup & Restore Recipes

The following recipes show examples of backup and restore tasks using gbak . These are probably the commonest cases that you will encounter as a DBA. All the examples use the employee database supplied with Firebird and the actual location is correctly configured in aliases.conf . Each of the following recipes is run with the assumption that the environment variables ISC_USER and ISC_PASSWORD have been given suitable values.

6.1. Backup & Restore Prerequisites

If you replace an open and running database, there is a good chance that you will corrupt it. For best results and minimal chance of corrupting a database, you should close it before replacing it. To close a database, use gfix as follows:

The example above prevents any new transaction from being started which prevents new queries being executed or new sessions connecting to the database. It will wait for up to 60 seconds for everyone to logout and for all current transactions to complete before shutting down the database. If any long running transactions have not completed by the end of 60 seconds, the shutdown will timeout and the database will remain open.

After the restore of the database has completed, the database will automatically be opened again for use.

6.2. A Simple Backup & Restore

This example takes a backup, then immediately overwrites the original database using the new backup. This is not normally a good idea as the first action of a restore is to wipe out the database.

6.3. Metadata Only

It is possible to use gbak to recreate an empty database containing only the various domains, tables, indices and so on, of the original database but none of the data. This can be useful when you have finished testing your application in a test environment and wish to migrate the system to a production environment, for example, but starting afresh with none of your test data.

When the above dump file is restored on the production server, only the metadata will be present.

There is another way to create a database with no data and only the metadata. Simply restore from an existing dump which contains the data and supply the -m[eta_data] switch to the restore command line. The database will be restored but none of the original data will be present.

The -m[eta_data] switch can be used on either a backup or a restore to facilitate the creation of a clone database (or overwrite an existing one) with no actual data.

6.4. Splitting The Backup

The gsplit filter application, documented in its own manual, doesn’t actually work anymore. This filter was supplied with old versions of InterBase and Firebird to allow large database backups to be split over a number of files so that file system limits could be met. Such limits could be the size of a CD, the 2GB limit on individual file sizes on a DVD, where some Unix file systems have a 2 GB limit and so on.

Gbak allows the dump files to be split into various sizes (with a minimum of 2048 bytes) and will only create files it needs.

The sizes after each filename indicate how large that particular file is allowed to be. The default size is bytes, but you can specify a suffix of k , m or g to use units of kilo, mega or gigabytes.

If the dump completes before writing to some files, then those files are not created. A dump file is only ever created when it must be.

The size of the final dump file will be quietly ignored if the database has grown too large to allow a truncated backup to complete. If, in the example above, the backup needs a total of 1500M, then the last file would be written to a final size of 900m rather than the 600m specified.

To restore such a multi-file backup requires that you specify all of the filenames in the dump and in the correct order. The following example shows the employee database above being restored from the two files dumped above:

6.5. Change The ODS

Normally the ODS used is the one in force by the version of Firebird used to restore the database. So, the examples above will actually change the ODS when the database is restored. The backup should be taken using the gbak utility supplied by the old ODS version of InterBase or Firebird. The restore should be carried out using gbak from the newer version of Firebird.

After the above, the old 2.0 Firebird database will have been recreated — wiping out the old database — as a Firebird 2.1 database with the corresponding upgrade to the ODS from 11.0 to 11.1.

The script setenv_firebird is not supplied with Firebird and simply sets PATH etc to use the correct version of Firebird as per the supplied parameter.

6.6. Change The Cache Size

The default database cache is created when the database is created, or subsequently by using gfix . Gbak can restore a database and reset the default cache size as well. The process is as follows:

The default cache size is used when the number of buffers is zero, as in the first example above. Gbak allows this to be changed if desired. Gbak , however, cannot set the cache size back to zero. You must use gfix to do this.

6.7. Change The Page Size

Similar to the example above to change the default database cache size, the database page size can also be changed using gbak .

6.8. Create A Read-Only Database Clone

Sometimes you do not want your reporting staff running intensive queries against your production database. To this end, you can quite easily create a clone of your production database on a daily basis, and make it read-only. This allows the reporting team to run as many intensive reports as they wish with no ill effects on the production database and it prevents them from inadvertently making changes.

The following example shows the production employee database running on Linux server tux, being cloned to the reporting team’s Linux server named tuxrep. First on the production tux server:

Then on the reporting team’s tuxrep server:

6.9. Create a Database Clone Without a Dump File.

You may use gbak to create a clone of a database, on the same server, without needing to create a potentially large dump file. To do this, you pipe the output of a gbak backup directly to the input of a gbak restore, as follows.

You will notice that the output file name for the backup is stdout and the input file name for the restore is stdin . This ability to pipe standard output of one process to the standard input of another, is how you can avoid creating an intermediate dump file. The commands above assume that there are suitable alias names set up for both emptest and emptest_2. If not, you will need to supply the full path to the two databases rather than the alias.

The -replace option on the restore process will overwrite the database name specified — as an alias or as a full path — if it exists and will create it anew if it doesn’t. You may also use the -recreate overwrite option as an alternative. Both have the same result.

If you don’t want to overwrite any existing databases, use -create which will only create a database if it doesn’t already exist, and will exit with an error if it does. In POSIX compatible systems, the error code in $? is 1 in this case.

Further examples of backing up and restoring remote databases over ssh, using the stdin and stdout file names, can be seen below.

6.10. Backup & Restore With & Without Shadow Files.

Databases can have shadow files attached in normal use. Gbak happily backs up and restores those as well and in normal use, shadow files will be recreated. Should you wish to restore the database only and ignore the shadows, gbak can do that for you as the following example shows.

I use isql in the above examples as gstat -h seems to get confused about how many shadows there are on a database. It reports zero when there are two, eventually it catches up and reports that there are two, then, if you kill a shadow, it reports that there are now three!

6.11. Remote Backups & Restores

Firebird’s gbak utility can make backups of a remote database. To do this, you need to connect to the service manager running on the remote server, this is normally called service_mgr . The following example shows the Firebird employee database on server tuxrep being backed up from the server tux. The backup will be written to the remote server, in other words, the backup file will be created on the tuxrep server and not on the tux one. The network protocol in use is TCP.

The backup file will have the same owner and group as the Firebird database server — on Unix systems at least.

It is also possible to restore a remote database in this manner as well, and gbak allows this.

The above example uses the handy Unix ability to split a long line over many shorter ones using a back slash as the final character on the line.

As ever, you are advised to beware of replacing a database in case there are problems during the restore. The example above recreates the existing database in read-only mode but this need not always be the case.

A remote backup can also be run on the database server itself! On Windows, this makes no difference, but on Unix systems, this local-remote method of backups and restores reduces network traffic. The ‘remote’ server, in this case, is not actually remote it is just the method of running the backup — connecting to the service manager — that implies remoteness.

And corresponding restores can also be run ‘remotely’:

The format of the parameter used for the -service switch is different according to the nature of the network protocol in use:

When using TCP networks, the parameter separator is a colon, as in -service server_name:service_mgr .

When using named pipes, the parameter requires two leading back slashes and the separator is another back slash, as in -service \server_nameservice_mgr .

6.12. Remote Backups and Restores Using SSH

As shown above, you can use the special file names stdin and stdout to backup and restore a database to a separate database on the same server. However, you can also use the same tools, over an SSH connection to a remote server, and pass the backup of one database directly to a restoration of a separate one.

The first example copies a local database to a remote server where Firebird is running and the firebird user has its environment set up so that the gbak tool is on $PATH by default, on login.

In each of the following examples, the -user sysdba and -password whatever parameters on the command lines have been replaced by <…​>. When executing these commands, any remote gbak commands will require to have them specified unless the firebird user on the remote database(s) has ISC_USER and ISC_PASSWORD defined in the .profile or `.bashrc `(or equivalent) login files. However, that is a seriously bad idea and incredibly insecure.

When the above is executed, you will be prompted for a password for the remote firebird user on server tuxrep, assuming that you don’t have a proper SSH key-pair already set up and active. The command will replace the local database according to the alias name emptest but you can, if required, supply full path names for the databases. The following shows an example of the above being executed.

As you can see, there’s not much in the way of output, but you can connect remotely and check:

The next example, shows a remote database being backed up to a local one, in a similar manner.

You can see that a new tuxrep_emptest.fdb database has been created. Does it work? Checking with isql shows that it does.

The final example shows how to backup a remote database on one server, to a remote database on another.

6.13. Using External Tools

Gbak and nbackup are the best tools to use when backing up and/or restoring Firebird databases. They have been extensively tested and know the internals of the database and how it works, so the chances of these tools corrupting your valuable data are very slim. However, some DBAs still like to use external tools (those not supplied with Firebird) to make backups for whatever reason.

Because it is not possible for external tools to know where a database is to be found, given the alias name, the script writer and/or DBA must explicitly find out the correct location of the database file(s) and supply these to the external tool. To make this simpler for script writers, my own installation uses a standard in my aliases.conf file as follows:

The database alias must start in column one.

There must be a single space before the equals sign (=).

There must be a single space after the equals sign (=).

Double quotes around the database filename is not permitted — it doesn’t work for the Firebird utilities either.

Databases are all single file databases.

The last rule applies to my installation only and means that the following simple backup script will work. If multiple file databases were used, more coding would be required to take a backup using external tools.

The following shows the use of the gzip utility on a Linux server to take and compress a backup of a running database. The following is run as the root user due to the requirement to run gfix to shut down the database.

The restore process for this database would be the reverse of the above. Again, the following runs as root.

7. Gbak Caveats

The following is a brief list of gotchas and funnies that I have detected in my own use of gbak . Some of these are mentioned above, others may not be. By collecting them all here in one place, you should be able to find out what’s happening if you have problems.

7.1. Gbak Default Mode

If you do not specify a mode switch such as -b[ackup] or -c[reate] etc, then gbak will perform a backup as if the -b[ackup] switch had been specified — provided that the other switches specified are correct for a backup.

This detection of whether you are attempting a backup or a restore means that if you use the -z command line switch to view gbak information, then you will create a backup — and overwrite the backup file you supply — if the command line also has a database name and a backup file name present. This assumes that there is a way for gbak to determine the username and password to be used — either as command line parameters or via defined environment variables.

7.2. Normal Versus Privileged Users

Only a SYSDBA or the owner of a database can take a backup of the database, however, any authenticated user can restore a database backup using the -c[reate] switch. This means that you must make sure you prevent your backup files from falling into the wrong hands because there is nothing then to stop unauthorised people from seeing your data by the simple process of restoring your backups onto their server.

The database restore will fail, of course, if the user carrying it out is not the database owner and a database with the same filename already exists.

7.3. Silent Running?

The -y suppress_output switch is supposed to cause all output to be suppressed. Similar in fact to running with -v[erify] not specified. However, all it seems to do is cause the output (according to the -v[erify] switch setting) to be written to a file called suppress_output , however this only works once because the next run of gbak with -y suppress_output will fail because the file, suppress_output , already exists.

It is possible that this problem was introduced at version 2 for Firebird, because both 2.0 and 2.1 versions actually use the -y suppress switch rather then -y suppress_output . Using this (shorter) option does work as intended and the output is indeed suppressed.

7.4. Gbak log file Cannot Be Overwritten

If you specify a log file name with the -y switch, and the file already exists, then even though the firebird user owns the file, and has write permissions to it, gbak cannot overwrite it. You must always specify the name of a log file that doesn’t exist. On Linux systems, the following might help:

The above is quite useful in as much as it prevents you from overwriting previous backups that may be required. The downside is that you now need to introduce a housekeeping system to tidy away old, unwanted backups to prevent your backup area filling up.

7.5. Use of ‘stdin’ or ‘stdout’ File Names

Gbak recognizes the literal strings ‘stdin’ and ‘stdout’ as source or destination filenames. In POSIX systems, when the standard input and/or standard output channels are used, it is not permitted to execute seek operations on these channels. Using ‘stdin’ or ‘stdout’ as file names with gbak will force gbak to use processing that will not seek on the input or output channels, making them suitable for use in pipes — as per the examples in the recipes section above.

These file names, while they appear to be POSIX names, are definitely not synonyms for /dev/stdin or /dev/stdout , they are simply literals that gbak checks for while processing its parameters. Do not attempt to use names /dev/stdin or /dev/stdout in a piped process as it will most likely fail.

If you wish to create a dump file actually named either stdin or stdout, then you should specify the filename as a full, or relative, path name such as ./stdin or ./stdout , which causes gbak to treat them as a literal file name rather than a special file name that causes different to normal processing.during the dump or restore process.

Appendix A: Document history

The exact file history is recorded in the firebird-documentation git repository; see https://github.com/FirebirdSQL/firebird-documentation

Created as a chapter in the Command Line Utilities manual.

More minor updates and converted to a stand alone manual.

Corrected the section on -y Suppress_output plus corrected the formatting of various screen dumps. They had been reformatted as text at some point.

Added a bit more details to the -o[ne_at_a_time] restore option to explain transactions.

Noted that gbak defaults to running a backup or recover according to the first file name parameter supplied.

A few minor formatting errors, URLs and some examples were corrected.

Also added an example of a meta data only backup and restore.

Updated the -z option to indicate that it does carry out a backup.

Updated to cover Firebird 2.5 changes.

Corrected description of -g[arbage_collect] switch.

Lots of spelling mistakes corrected.

Updated to document the use of the stdin and stdout file names in backups and restores, which allow backups to be written to or read from standard input and standard output.

A section was added on the use of the above to clone databases without requiring an intermediate dump file. An additional section was also added to show how, using the above in conjunction with SSH, backup and/or restore operations could be carried out on databases where one or both of the databases in question, are remote.

Further updates to document the use of the stdin and stdout file names in backups and restores. A section has been added to Gbak Caveats giving more in depth detail about these two special file names.

A section has been added to explain how to speedup your backups. A note has been added to the -service option to explain that it’s use is not restriced to remote databases. Syntax errors in some examples corrected.

Slight update to the -use_[all_space] command line switch, to explain how it works in a more understandable manner.

A correction to the above change to the -use_[all_space] command line switch — it affects all subsequent pages as well as the ones created during the restore.

Conversion to AsciiDoc, minor copy-editing

Appendix B: License notice

The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. Copies of the License are available at https://www.firebirdsql.org/pdfmanual/pdl.pdf (PDF) and https://www.firebirdsql.org/manual/pdl.html (HTML).

The Original Documentation is titled Firebird Backup & Restore Utility.

The Initial Writer of the Original Documentation is: Norman Dunbar.

Copyright © 2009-2013. All Rights Reserved. Initial Writer contact: NormanDunbar at users dot sourceforge dot net.

Источник

Сообщение об ошибках gbak

В табл. 38.3 описаны сообщения об ошибках, которые могут возникнуть в процессе копирования и восстановления, вместе с некоторыми советами, как поступать с этими ошибками.

Таблица 38.3. Сообщения об ошибках gbak при копировании и восстановлении

Сообщение об ошибке

Причины и рекомендуемые действия

Array dimension for column <string> is invalid

(Ошибочная размерность массива для столбца <строка>)

Исправьте определение массива перед копированием

Bad attribute for RDB$CHARACTER SETS (Неверный атрибут для RDB$CHARACTER_SETS)

Используется несовместимый набор символов

Bad attribute for RDB$COLLATIONS (Неверный атрибут для RDB$COLLATIONS)

Исправьте атрибут в указанной системной таблице

Bad attribute for table constraint (Неверный атрибут для ограничения таблицы)

Проверьте ограничения целостности. Если ошибка возникла при восстановлении, рассмотрите возможность использования режима -no_validity для удаления проверки ограничений

Blocking factor parameter missing

(Отсутствует параметр коэффициента блокирования)

Задайте числовой аргумент для режима «коэффициент» (например, для ленточного устройства для копии)

Cannot commit files (Невозможно подтвердить файлы)

База данных содержит дефекты или нарушения ограничений целостности метаданных. Попытайтесь восстановить таблицы с использованием режима -one at a time или удалите проверку ограничений, используя режим -no_yalidity

Cannot commit index <string> (Невозможно подтвердить индекс <строка>)

Возможно, данные конфликтуют с определенными индексами. Попытайтесь выполнить восстановление с использованием «неактивного» режима для предотвращения создания индексов

Cannot find column for blob … (Невозможно найти столбец blob)

Используйте -one_at_a_time для отыскания проблемной таблицы

Cannot find table <string> . . . (Невозможно найти таблицу <строка>)

То же

Cannot open backup file <string> (Невозможно открыть файл копии <строка>)

Исправьте имя файла копии и выполните снова

Cannot open status and error output file <string>

(Невозможно открыть выходной файл состояния и ошибок <строка>)

Сообщения были направлены в файл с неверным именем или в файл, который уже существует. Проверьте формат задания файла или полномочия к каталогу выходного файла, либо удалите существующий файл, либо выберите другое имя для файла протокола

Commit failed on table <stririg> (Ошибка подтверждения таблицы <строка>)

Разрушение данных или нарушение ограничения целостности в указанной таблице. Проверьте метаданные или восстановите «одну таблицу за раз»

Conflicting switches for backup/restore

(Конфликт переключателей для копирования/восстановления)

Режим только для копирования и режим только для восстановления были использованы в одной операции. Исправьте и снова выполните команду

Couxd not open file name <string>

(Невозможно открыть файл с именем <строка>)

Исправьте имя файла и снова выполните команду

Could not read from file <string> (Невозможно читать из файла <строка>)

Исправьте имя файла и снова выполните команду

Could not write to file <string> (Невозможно писать в файл <строка>)

Исправьте имя файла и снова выполните команду

Datatype n not understood (Тип данных n неизвестен)

Где-то задан неверный тип данных. Проверьте метаданные и при необходимости повторите команду с использованием -one at a time

Database format n is too old to restore to

(Формат базы данных слишком старый для восстановления)

Используемая версия gbak несовместима с версией Firebird, которым создавалась база данных, указанная для копирования. Попытайтесь скопировать эту базу данных с использованием режима -expand или -old, а затем восстановите ее

Database <string> already exists (База данных <строка> уже существует)

Вы использовали -create при восстановлении файла копии, но указанная база данных уже существует. Если вы действительно хотите заменить существующую базу данных, используйте переключатель -R, в противном случае введите другое имя файла базы данных

Could not drop database <string> (database might be in use)

(Невозможно удалить базу данных <строка> (возможно, база данных используется))

Вы использовали -replace при восстановлении файла в существующую базу данных, но эта база данных находится в использовании. или измените имя у восстанавливаемой базы данных, или подождите завершения использования существующей базы данных

Do not recognize record type n . . . (He распознан тип записи n)

Проверьте метаданные и при необходимости выполните восстановление с использованием -one at_a time

Do not recognize <string> attribute n — continuing …

(He распознан атрибут n <строка> — выполнение продолжается)

Не фатальная ошибка в данных

Do not understand BLOB INFO item n … (Непонятный элемент BLOB INFO)

Error accessing BLOB column <string> — continuing …

(Ошибка при обращении к столбцу BLOB <строка> — выполнение продолжается)

Не фатальная ошибка в данных

ERROR: Backup incomplete The backup cannot be written to the target device or file system

(ОШИБКА: копирование не завершено. Копия не может быть записана на устройство или в файл системы)

Причинами могут быть недостаточное пространство, проблемы с выводом на устройство или разрушение данных

Error committing metadata for table <string>

(Ошибка при подтверждении метаданных для таблицы <строка>)

Возможно, таблица разрушена. При восстановлении базы данных используйте -one at a time для изоляции таблицы

Exiting before completion due to errors (Выход до завершения по причине ошибок)

Это сообщение сопровождает другие сообщения об ошибках и указывает на то, что копирование или восстановление не может быть выполнено. Причину найдите в других сообщениях об ошибках

Expected array dimension n but instead found m

(Ожидается размерность массива n, но найдена m)

Проблемы с массивом

Expected array version number n but instead found m

(Ожидается номер версии массива n, но найден m)

Проблемы с массивом

Expected backup database <string>, found <string>

(Ожидается копия базы данных <строка>, найдена <строка>)

Проверьте имена восстанавливаемых файлов копии

Expected backup description record . . . (Ожидается дескриптор записи копии …)

Expected backup start time <string>, found <string> . . .

(Ожидается время начала копирования <строка>, найдено <строка>)

Expected backup version 1, 2, or 3. Found n …

(Ожидается версия копии 1, 2 или 3. Найдена n)

Expected blocking factor, encountered <string>

(Ожидается коэффициент блокирования, встречено <строка>)

Режим -factor требует числового аргумента

Expected data attribute . . . (Ожидается атрибут данных)

Expected database description record . . . (Ожидается дескриптор записи базы данных)

Expected number of bytes to be skipped, encountered <string> …

(Ожидается количество пропускаемых байтов, встречено <строка>)

Expected page size, encountered <string>

(Ожидается размер страницы, встречено <строка>)

Режим -page_size требует числового аргумента

Expected record length . . . (Ожидается длина записи)

Expected volume number n, found volume m (Ожидается номер тома n, найден том m)

При копировании на множество лент или восстановлении с множества лент убедитесь, что задали правильный номер тома

Expected XDR record length … (Ожидается длина записи XDR)

Failed in put blr gen id … (Ошибка в put blr gen id …)

Failed in store blr gen id … (Ошибка в store blr gen id …)

Failed to create database <string> (Ошибка создания базы данных <строка>)

Указана неверная база данных, возможно, она уже существует

Column <string> used in index <string> seems to have vanished

(Столбец <строка>, используемый в индексе <строка>, видимо пропал)

Индекс ссылается на не существующий столбец. Проверьте определение индекса или столбца

Found unknown switch

(Найден неизвестный переключатель)

Задан режим, не распознанный утилитой gbak

Index <string> omitted because n of the expected m keys were found .,.

(Индекс <строка> пропускается потому, что было найдено n из ожидаемых m ключей)

Input and output have the same name Disallowed.

(Вход и выход имеют одни и те же имена. Отменяется.)

Файлы копии и базы данных должны иметь различные имена. Исправьте имена и выполните заново

Length given for initial file (n) is less than minimum (jn)

(Длина, указанная для начального файла (n), меньше минимума (m))

Недостаточное пространство было выделено для восстановления базы данных во множество файлов. Firebird автоматически увеличивает размер страницы до минимального значения. Не требуется никаких действий

Missing parameter for the number of bytes to be skipped …

(Отсутствует параметр для количества пропускаемых байтов)

Multiple sources or destinations specified

(Задано множество входных или выходных имен)

Только имя одного устройства может быть указано для входа или выхода

No table name for data

(He задана таблица для данных)

База данных содержит данные, которые не относятся ни к какой таблице. Используйте gfix для проверки или починки базы данных

Page size is allowed only on restore or create

(Размер страницы допустим только для восстановления или создания)

Режим -page size был использован при копировании вместо восстановления

Page size parameter missing (Отсутствует параметр размера страницы)

Режим -page_size требует числового аргумента

Page size specified (n bytes) rounded up to in bytes

(Заданный размер страницы (n байтов) округляется до m байтов)

Не фатальная ошибка. Неверный размер страницы округляется до величины 1024, 2048, 4096, 8192 или 16 384 — которая ближе к указанной

Page size specified (n) greater than limit (16 384 bytes)

(Указанный размер страницы (n) больше максимального значения (16 384 байт))

Задайте размер страницы 1024, 2048, 4096, 8192 или 16 384

Password parameter missing (Отсутствует параметр пароль)

Копирование или восстановление обращается к удаленному серверу. Используйте переключатель -password и задайте пароль

Protection is not there yet (Запита пока не существует)

Используется нереализованный режим

-unprotected

Redirect location for output is not specified

(Перенаправление размещения для вывода не задано)

Вы задали режим, зарезервированный для будущего использования в Firebird

REPLACE specified, but the first file <Jstring> is a database

(Задано REPLACE, но первым файлом <строка> является база данных)

Проверьте, чтобы именем файла, следующим за режимом -replace, был файл копии, а не базы данных

Requires both input and output file names

(Требуются имена как входного, так и выходного файла)

Задайте входной и выходной файл при копировании и восстановлении

RESTORE: decompression length error (RESTORE: ошибка длины декомпрессии)

Возможна несовместимость версии gbak, используемой для копирования и gbak, используемой для восстановления. Проверьте, был ли режим -expand задан при копировании

Restore failed for record in table <string>

(Ошибка при восстановлении для записи из таблицы <строка>)

Возможно разрушение данных в указанной таблице

Skipped n bytes after reading a bad attribute n . . .

(Пропущено n байт после чтения неверного атрибута т)

Не фатально

Skipped n bytes looking for next valid attribute, encountered attribute m …

(Пропущено n байт при поиске следующего верного атрибута, встречен атрибут m)

Не фатально

Trigger <string> is invalid . . . (Триггер <строка> неверен)

Unexpected end of file on backup file

(Непредвиденное завершение копируемого файла)

Восстановление файла копии завершилось с ошибкой; видимо процедура копирования, которая создала этот файл копии, завершилась ненормально. Если возможно, создайте новый файл копии и используйте его для восстановления базы данных

Unexpected I/O error while accessing <string> backup file

(Непредвиденная ошибка ввода/вывода при обращении к файлу копии <строка>)

Вероятно, возникла ошибка диска или другого оборудования при выполнении копирования или восстановления

Unknown switch <string> (Неизвестный переключатель <строка>)

Был задан нераспознанный утилитой gbak режим

User name parameter missing (Отсутствует параметр имя пользователя)

Копирование или восстановление обращается к удаленной машине. Задайте имя пользователя переключателем -user

Validation error on column in table <string>

(Ошибка проверки столбца в таблице <строка>)

База данных не может быть восстановлена, потому что содержит данные, которые нарушают ограничение целостности. Попытайтесь удалить ограничения из метаданных, указав при восстановлении -no_validity

Warning — record could not be restored

(Предупреждение — запись не может быть восстановлена)

Возможно разрушение указанных данных

Wrong length record, expected n encountered m . . .

(Неверная длина записи, ожидается n, встретилась m)

Пора дальше

Утилита gbak имеет большое значение для поддержания базы данных в работоспособном состоянии и для устранения некоторых типов разрушения данных. Другим инструментом, который вы можете использовать для выполнения задач администрирования, ведения и восстановления базы данных, является программа gfix, обсуждаемая дальше. Комбинированное использование gfix и gbak для анализа и иногда починки разрушенной базы данных описывается в приложении 4.

Читайте также

Инструмент командной строки gbak

Инструмент командной строки gbak
Наиболее универсальным инструментом, позволяющим осуществить резервное копирование базы данных на любой платформе, является gbak — утилита командной строки, входящая в поставку InterBase. С помощью gbak можно обратиться к любому функционирующему

Восстановление с использованием инструмента gbak

Восстановление с использованием инструмента gbak
Так же как и резервное копирование, восстановление можно осуществить двумя способами — с помощью утилиты gbak и с помощью Services API (если версия InterBase-сервера имеет это API). Наиболее универсальным способом, который мы и

Отчет об ошибках

Отчет об ошибках
На вкладке Дополнительно в окне Свойства системы нажимаем кнопку Отчет об ошибках. Откроется одноименное окно Отчет об ошибках (рис. 4.5), в котором устанавливаем переключатель в положение Отключить отчет об ошибках и оставляем установленным флажок Но

gbak

gbak
Эта утилита предназначена для резервного копирования и восстановления баз данных. Поскольку она работает на уровне структур и форматов данных, gbak является единственной корректной утилитой для копирования. Она также обнаруживает разрушения базы данных, освобождает

Сообщения об ошибках gsec

Сообщения об ошибках gsec
В табл. 34.2 представлены сообщения об ошибках gsec.Таблица 34.2. Сообщения об ошибках gsec

Сообщение
Причины и рекомендуемые действия

Add record error (Ошибка добавления записи)
Неверный синтаксис или вы пытаетесь добавить пользователя, который уже

ГЛАВА 38. Резервное копирование и восстановление баз данных (gbak).

ГЛАВА 38. Резервное копирование и восстановление баз данных (gbak).
Корректное резервное копирование базы данных Firebird компактно сохраняет метаданные и данные базы данных в файле на жестком диске или на другом запоминающем устройстве. Настоятельно рекомендуется

Файлы gbak

Файлы gbak
Утилита gbak анализирует и разбивает на части файлы Firebird, сохраняя отдельно метаданные и данные в компактном формате. Копия, сделанная gbak, не является файлом базы данных и не будет распознаваться сервером. Чтобы стать используемой, она должна быть восстановлена в

Другие таланты gbak

Другие таланты gbak
Утилита gbak также выполняет последовательность других важных задач в процессе анализа, сохранения и восстановления базы данных. Одни являются автоматическими, другие должны быть запрошены при использовании переключателей при вызове программы из

Аргументы для gbak -b[ackup]

Аргументы для gbak -b[ackup]
исходные-данные- это полный путь и имя файла копируемой базы данных. В Firebird 1.5 это может быть алиас. При копировании многофайловой базы данных используйте имя только первого (первичного) файла базы данных.копия- полный путь и имя файла, куда

Аргументы gbak для восстановления

Аргументы gbak для восстановления
исходная-копия- полный путь и имя файла копии gbak. Если копия содержит несколько файлов, укажите только первый (первичный) файл gbak. В POSIX исходной- копией может быть также stdin, в этом случае gbak читает свои входные данные из стандартного ввода

Использование gbak с Менеджером сервисов Firebird

Использование gbak с Менеджером сервисов Firebird
Переключатель -se[rvice_mgr] вызывает Менеджер сервисов на (обычно) удаленном сервере. Это может сэкономить значительный объем времени и сетевого трафика, когда вы хотите создавать файлы копии или базы данных на том же хосте, где

Сообщения об ошибках gfix

Сообщения об ошибках gfix
В табл. 39.2 представлены исключения, которые могут появиться в командах gfix вместе с советами, как скорректировать ваши команды.Таблица 39.2. Сообщения об ошибках gfix

Сообщение об ошибке
Причины и рекомендуемые действия

Database file name &lt;string&gt; already given (Имя

gbak BackupRunner

gbak BackupRunner
Это элегантная, небольшая по объему графическая программа пользователя для утилиты Firebird gbak. Она не использует Services API, а предоставляет вместо этого флаги для установки переключателей gbak. По требованию утилита формирует информационные сообщения прямо в

Отчеты об ошибках

Отчеты об ошибках
В операционной системе Windows Vista реализован новый механизм отчетов об ошибках. Теперь ограничить и настроить его работу можно с помощью следующих параметров, расположенных в ветви реестра HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsWindows Error Reporting. Если не сказано иное,

Как учиться на чужих ошибках

Как учиться на чужих ошибках
Информация, которая всплывает в ходе ретроспектив, обычно крайне важна. Для команды настали нелёгкие времена, потому что менеджеры по продажам начали забирать программистов с работы на свои встречи, чтоб те играли роль «технических

Error Message Causes and Suggested Actions to Take

Array dimension for column <string> is invalid

Fix the array definition before backing up

Bad attribute for RDB$CHARACTER_SETS

An incompatible character set is in use

Bad attribute for RDB$COLLATIONS

Fix the attribute in the named system table

Bad attribute for table constraint

Check integrity constraints; if restoring, consider using the -no_validity option to delete validity constraints.

Blocking factor parameter missing

Supply a numeric argument for “factor” option

Cannot commit files

  • Database contains corruption or metadata ­violates integrity constraints.
  • Try restoring tables using -one_at_a_time option, or delete validity constraints using -no_validity option.

Cannot commit index <string>

  • Data might conflict with defined indexes.
  • Try restoring using “inactive” option to prevent rebuilding indexes.

Cannot find column for Blob

Cannot find table <string>

Cannot open backup file <string>

Correct the file name you supplied and try again

Cannot open status and error output file <string>

  • Messages are being redirected to invalid file name.
  • Check format of file or access permissions on the ­directory of output file.

Commit failed on table <string>

  • Data corruption or violation of integrity constraint in the specified table
  • Check metadata or restore “one table at a time”

Conflicting switches for backup/restore

A backup-only option and restore-only option were used in the same operation; fix the command and ­execute again.

Could not open file name <string>

Fix the file name and re-execute command

Could not read from file <string>

Fix the file name and re-execute command

Could not write to file <string>

Fix the file name and re-execute command

Datatype n not understood

An illegal data type is being specified

Database format n is too old to restore to

  • The gbak version used is incompatible with the InterBase version of the database
  • Try backing up the database using the -expand or -old options and then restoring it.

Database <string> already exists. To replace it, use the -R switch

  • You used -create in restoring a back up file, but the target database already exists.
  • Either rename the ­target database or use -replace.

Could not drop database <string> (database might be in use).

  • You used -replace in restoring a file to an existing database, but the database is in use.
  • Either rename the target database or wait until it is not in use.

Device type not specified

The -device option (Apollo only) must be followed by ct or mt; obsolete as of InterBase V3.3

Device type <string> not known

The -device option (Apollo only) was used incorrectly; obsolete as of InterBase V3.3

Do not recognize record type n

Do not recognize <string> attribute n — continuing

Do not understand BLOB INFO item n

Error accessing BLOB column <string> — continuing

ERROR: Backup incomplete

  • The backup cannot be written to the target device or file system
  • Either there is insufficient space, a hardware write problem, or data corruption

Error committing metadata for table <string>

  • A table within the database could be corrupt.
  • If restoring a database, try using -one_at_a_time to isolate the table.

Exiting before completion due to errors

  • This message accompanies other error messages and indicates that back up or restore could not execute.
  • Check other error messages for the cause.

Expected array dimension n but instead found m.

Try redefining the problem array.

Expected array version number n but instead found m.

Try redefining the problem array.

Expected backup database <string>, found <string>

Check the name of the backup file being restored.

Expected backup description record.

Expected backup start time <string>, found <string>

Expected backup version 1, 2, or 3. Found n.

Expected blocking factor, encountered <string>

The -factor option requires a numeric argument.

Expected data attribute

Expected database description record

Expected number of bytes to be skipped, encountered <string>

Expected page size, encountered <string>

The -page_size option requires a numeric argument.

Expected record length

Expected volume number n, found volume n

When backing up or restoring with multiple tapes, be sure to specify the correct volume number.

Expected XDR record length

Failed in put_blr_gen_id

Failed in store_blr_gen_id

Failed to create database <string>

The target database specified is invalid; it might already exist.

column <string> used in index <string> seems to have vanished

  • An index references a non-existent column.
  • Check either the index definition or column definition.

Found unknown switch

An unrecognized gbak option was specified.

Index <string> omitted because n of the expected m keys were found.

Input and output have the same name. Disallowed.

A backup file and database must have unique names; correct the names and try again.

Length given for initial file (n) is less than minimum (m).

  • In restoring a database into multiple files, the primary file was not allocated sufficient space.
  • InterBase automatically increases the page length to the minimum value.
  • No action necessary.

Missing parameter for the number of bytes to be skipped.

Multiple sources or destinations specified

Only one device name can be specified as a source or target.

No table name for data

  • The database contains data that is not assigned to any table.
  • Use gfix to validate or mend the database.

Page size is allowed only on restore or create.

The -page_size option was used during a back up instead of a restore.

Page size parameter missing

The -page_size option requires a numeric argument.

Page size specified (n bytes) rounded up to m bytes.

Invalid page sizes are rounded up to 1024, 2048, 4096, 8192, or 16384, whichever is closest.

Page size specified (n) greater than limit

Specify a page size of 1024, 2048, 8192, or 16384. The default is 4096 bytes.

Password parameter missing

  • The back up or restore is accessing a remote machine.
  • Use -password and specify a password.

Protection is not there yet

Unimplemented option -unprotected used

Redirect location for output is not specified.

You specified an option reserved for future use by InterBase.

REPLACE specified, but the first file <string> is a database.

Check that the file name following the -replace option is a backup file rather than a database.

Requires both input and output file names.

Specify both a source and target when backing up or restoring.

RESTORE: decompression length error

  • Possible incompatibility in the gbak version used for backing up and the gbak version used for restoring.
  • Check whether -expand should be specified during back up.

Restore failed for record in table <string>

Possible data corruption in the named table

Skipped n bytes after reading a bad attribute n.

Skipped n bytes looking for next valid attribute, encountered attribute m.

Trigger <string> is invalid

Unexpected end of file on backup file

  • Restoration of the backup file failed; the backup procedure that created the backup file might have terminated abnormally.
  • If possible, create a new backup file and use it to restore the database.

Unexpected I/O error while <string> backup file

A disk error or other hardware error might have occurred during a backup or restore.

Unknown switch <string>

An unrecognized gbak option was specified.

User name parameter missing

  • The backup or restore is accessing a remote machine.
  • Supply a user name with the -user option.

Validation error on column in table <string>

  • The database cannot be restored because it contains data that violates integrity constraints.
  • Try deleting constraints from the metadata by specifying -no_validity during restore.

Warning — record could not be restored

Possible corruption of the named data

Wrong length record, expected n encountered n

Модераторы: kdv, Alexey Kovyazin

WildSery

Заслуженный разработчик
Сообщения: 1738
Зарегистрирован: 05 июн 2006, 16:19

Merlin писал(а):Затем, что gbak, gsec и isql — это не gfix и не gstat :wink:

Кто-то что-то путает. Это как раз gbak и gfix свои хелпы при запуске без параметров показывают, а все остальные — нет. Или я намёк не понял?


Merlin

Динозавр IB/FB
Сообщения: 1502
Зарегистрирован: 27 окт 2004, 11:44

Сообщение

Merlin » 14 июн 2007, 20:14

WildSery писал(а):

Merlin писал(а):Затем, что gbak, gsec и isql — это не gfix и не gstat :wink:

Кто-то что-то путает. Это как раз gbak и gfix свои хелпы при запуске без параметров показывают, а все остальные — нет. Или я намёк не понял?

Понять-то ты понял. Только я знаю, кто путает.

[root@develop bin]# /opt/firebird/bin/gbak
gbak: ERROR: requires both input and output filenames
gbak: Exiting before completion due to errors

хелп показывает только gfix. gstat прямо говорит — слыш, базу-то укажи (а ему и сказать больше почти неча), а gsec и isql естественным образом входят в командный режим. Чо-та ты перегреваешься. Отдохнуть тебе надобно. Или от работы, или от инету, или от обоих сразу :-D


kdv

Forum Admin
Сообщения: 6595
Зарегистрирован: 25 окт 2004, 18:07

Сообщение

kdv » 14 июн 2007, 23:40

smplmnd писал(а):Скрипт с таким набором ключей служит для того лишь, чтобы в случае ошибок в работе приложения, использующего эту базу, можно было быстренько ее свернуть, упаковать и отправить разработчику — вместе со всей хренью, которую приложение наплодило — я так думаю.

от же ж, злодеи! ключей понапихали… :-)

теперь без юмора — задолбало уже объяснять, что ключ -ig используется только для бэкапа битой базы. которую gbak без -ig забэкапить не может. И в случае повреждения базы бэкап с битой базы разработчику нахрен не нужен, потому что элементарно может быть невосстановимым. Для ремонта годится только оригинальная база, пусть и поврежденная.

Вам же хоть кол на голове теши, а вы все по диагонали читаете.
Увидели этот ключик в
http://www.ibase.ru/devinfo/db_repair.htm
и ну давай его пихать во все места…

p.s. конечно, из невосстановимого бэкапа можно вытащить данные, но только если купить IBBackupSurgeon.
http://www.ib-aid.com/option,com_conten … /Itemid,2/


WildSery

Заслуженный разработчик
Сообщения: 1738
Зарегистрирован: 05 июн 2006, 16:19

Сообщение

WildSery » 15 июн 2007, 11:20

Merlin писал(а):Понять-то ты понял. Только я знаю, кто путает.

[root@develop bin]# /opt/firebird/bin/gbak
gbak: ERROR: requires both input and output filenames
gbak: Exiting before completion due to errors

[root@asusrv bin]# /opt/firebird/bin/gbak
gbak:legal switches are:
-B(ACKUP_DATABASE) backup database to file
-BU(FFERS) override page buffers default

У тебя тоже всё верно, только у меня этот GBAK от 2-ки ;)
Так что я не перегревался.


smplmnd

Сообщения: 8
Зарегистрирован: 13 июн 2007, 19:03

Сообщение

smplmnd » 15 июн 2007, 16:56

Взял вместо .rpm .tar.gz, установил, поменял в конце установки пароль SYSDBA, вернул его обратно (так надо) и все прекраснейшим образом заработало. Так-то…


stix-s

Заслуженный разработчик
Сообщения: 557
Зарегистрирован: 13 дек 2005, 11:52

Сообщение

stix-s » 18 июн 2007, 08:42

smplmnd писал(а):Взял вместо .rpm .tar.gz, установил, поменял в конце установки пароль SYSDBA, вернул его обратно (так надо) и все прекраснейшим образом заработало. Так-то…

но про произвольные сокращения ключей тебе сказали — стоит сделать выводы


��������� �� ������� gbak

��������� �� ������� gbak

� ����. 38.3 ������� ��������� �� �������, ������� ����� ���������� � �������� ����������� � ��������������, ������ � ���������� ��������, ��� ��������� � ����� ��������.

������� 38.3. ��������� �� ������� gbak ��� ����������� � ��������������

��������� �� ������

������� � ������������� ��������

Array dimension for column <string> is invalid

(��������� ����������� ������� ��� ������� <������>)

��������� ����������� ������� ����� ������������

Bad attribute for RDB$CHARACTER SETS (�������� ������� ��� RDB$CHARACTER_SETS)

������������ ������������� ����� ��������

Bad attribute for RDB$COLLATIONS (�������� ������� ��� RDB$COLLATIONS)

��������� ������� � ��������� ��������� �������

Bad attribute for table constraint (�������� ������� ��� ����������� �������)

��������� ����������� �����������. ���� ������ �������� ��� ��������������, ����������� ����������� ������������� ������ -no_validity ��� �������� �������� �����������

Blocking factor parameter missing

(����������� �������� ������������ ������������)

������� �������� �������� ��� ������ «�����������» (��������, ��� ���������� ���������� ��� �����)

Cannot commit files (���������� ����������� �����)

���� ������ �������� ������� ��� ��������� ����������� ����������� ����������. ����������� ������������ ������� � �������������� ������ -one at a time ��� ������� �������� �����������, ��������� ����� -no_yalidity

Cannot commit index <string> (���������� ����������� ������ <������>)

��������, ������ ����������� � ������������� ���������. ����������� ��������� �������������� � �������������� «�����������» ������ ��� �������������� �������� ��������

Cannot find column for blob … (���������� ����� ������� blob)

����������� -one_at_a_time ��� ��������� ���������� �������

Cannot find table <string> . . . (���������� ����� ������� <������>)

�� ��

Cannot open backup file <string> (���������� ������� ���� ����� <������>)

��������� ��� ����� ����� � ��������� �����

Cannot open status and error output file <string>

(���������� ������� �������� ���� ��������� � ������ <������>)

��������� ���� ���������� � ���� � �������� ������ ��� � ����, ������� ��� ����������. ��������� ������ ������� ����� ��� ���������� � �������� ��������� �����, ���� ������� ������������ ����, ���� �������� ������ ��� ��� ����� ���������

Commit failed on table <stririg> (������ ������������� ������� <������>)

���������� ������ ��� ��������� ����������� ����������� � ��������� �������. ��������� ���������� ��� ������������ «���� ������� �� ���»

Conflicting switches for backup/restore

(�������� �������������� ��� �����������/��������������)

����� ������ ��� ����������� � ����� ������ ��� �������������� ���� ������������ � ����� ��������. ��������� � ����� ��������� �������

Couxd not open file name <string>

(���������� ������� ���� � ������ <������>)

��������� ��� ����� � ����� ��������� �������

Could not read from file <string> (���������� ������ �� ����� <������>)

��������� ��� ����� � ����� ��������� �������

Could not write to file <string> (���������� ������ � ���� <������>)

��������� ��� ����� � ����� ��������� �������

Datatype n not understood (��� ������ n ����������)

���-�� ����� �������� ��� ������. ��������� ���������� � ��� ������������� ��������� ������� � �������������� -one at a time

Database format n is too old to restore to

(������ ���� ������ ������� ������ ��� ��������������)

������������ ������ gbak ������������ � ������� Firebird, ������� ����������� ���� ������, ��������� ��� �����������. ����������� ����������� ��� ���� ������ � �������������� ������ -expand ��� -old, � ����� ������������ ��

Database <string> already exists (���� ������ <������> ��� ����������)

�� ������������ -create ��� �������������� ����� �����, �� ��������� ���� ������ ��� ����������. ���� �� ������������� ������ �������� ������������ ���� ������, ����������� ������������� -R, � ��������� ������ ������� ������ ��� ����� ���� ������

Could not drop database <string> (database might be in use)

(���������� ������� ���� ������ <������> (��������, ���� ������ ������������))

�� ������������ -replace ��� �������������� ����� � ������������ ���� ������, �� ��� ���� ������ ��������� � �������������. ��� �������� ��� � ����������������� ���� ������, ��� ��������� ���������� ������������� ������������ ���� ������

Do not recognize record type n . . . (He ��������� ��� ������ n)

��������� ���������� � ��� ������������� ��������� �������������� � �������������� -one at_a time

Do not recognize <string> attribute n — continuing …

(He ��������� ������� n <������> — ���������� ������������)

�� ��������� ������ � ������

Do not understand BLOB INFO item n … (���������� ������� BLOB INFO)

 

Error accessing BLOB column <string> — continuing …

(������ ��� ��������� � ������� BLOB <������> — ���������� ������������)

�� ��������� ������ � ������

ERROR: Backup incomplete The backup cannot be written to the target device or file system

(������: ����������� �� ���������. ����� �� ����� ���� �������� �� ���������� ��� � ���� �������)

��������� ����� ���� ������������� ������������, �������� � ������� �� ���������� ��� ���������� ������

Error committing metadata for table <string>

(������ ��� ������������� ���������� ��� ������� <������>)

��������, ������� ���������. ��� �������������� ���� ������ ����������� -one at a time ��� �������� �������

Exiting before completion due to errors (����� �� ���������� �� ������� ������)

��� ��������� ������������ ������ ��������� �� ������� � ��������� �� ��, ��� ����������� ��� �������������� �� ����� ���� ���������. ������� ������� � ������ ���������� �� �������

Expected array dimension n but instead found m

(��������� ����������� ������� n, �� ������� m)

�������� � ��������

Expected array version number n but instead found m

(��������� ����� ������ ������� n, �� ������ m)

�������� � ��������

Expected backup database <string>, found <string>

(��������� ����� ���� ������ <������>, ������� <������>)

��������� ����� ����������������� ������ �����

Expected backup description record . . . (��������� ���������� ������ ����� …)

 

Expected backup start time <string>, found <string> . . .

(��������� ����� ������ ����������� <������>, ������� <������>)

 

Expected backup version 1, 2, or 3. Found n …

(��������� ������ ����� 1, 2 ��� 3. ������� n)

 

Expected blocking factor, encountered <string>

(��������� ����������� ������������, ��������� <������>)

����� -factor ������� ��������� ���������

Expected data attribute . . . (��������� ������� ������)

 

Expected database description record . . . (��������� ���������� ������ ���� ������)

 

Expected number of bytes to be skipped, encountered <string> …

(��������� ���������� ������������ ������, ��������� <������>)

 
 

Expected page size, encountered <string>

(��������� ������ ��������, ��������� <������>)

����� -page_size ������� ��������� ���������

Expected record length . . . (��������� ����� ������)

 

Expected volume number n, found volume m (��������� ����� ���� n, ������ ��� m)

��� ����������� �� ��������� ���� ��� �������������� � ��������� ���� ���������, ��� ������ ���������� ����� ����

Expected XDR record length … (��������� ����� ������ XDR)

 

Failed in put blr gen id … (������ � put blr gen id …)

 

Failed in store blr gen id … (������ � store blr gen id …)

 

Failed to create database <string> (������ �������� ���� ������ <������>)

������� �������� ���� ������, ��������, ��� ��� ����������

Column <string> used in index <string> seems to have vanished

(������� <������>, ������������ � ������� <������>, ������ ������)

������ ��������� �� �� ������������ �������. ��������� ����������� ������� ��� �������

Found unknown switch

(������ ����������� �������������)

����� �����, �� ������������ �������� gbak

Index <string> omitted because n of the expected m keys were found .,.

(������ <������> ������������ ������, ��� ���� ������� n �� ��������� m ������)

 

Input and output have the same name Disallowed.

(���� � ����� ����� ���� � �� �� �����. ����������.)

����� ����� � ���� ������ ������ ����� ��������� �����. ��������� ����� � ��������� ������

Length given for initial file (n) is less than minimum (jn)

(�����, ��������� ��� ���������� ����� (n), ������ �������� (m))

������������� ������������ ���� �������� ��� �������������� ���� ������ �� ��������� ������. Firebird ������������� ����������� ������ �������� �� ������������ ��������. �� ��������� ������� ��������

Missing parameter for the number of bytes to be skipped …

(����������� �������� ��� ���������� ������������ ������)

   

Multiple sources or destinations specified

(������ ��������� ������� ��� �������� ����)

������ ��� ������ ���������� ����� ���� ������� ��� ����� ��� ������

No table name for data

(He ������ ������� ��� ������)

���� ������ �������� ������, ������� �� ��������� �� � ����� �������. ����������� gfix ��� �������� ��� ������� ���� ������

Page size is allowed only on restore or create

(������ �������� �������� ������ ��� �������������� ��� ��������)

����� -page size ��� ����������� ��� ����������� ������ ��������������

Page size parameter missing (����������� �������� ������� ��������)

����� -page_size ������� ��������� ���������

Page size specified (n bytes) rounded up to in bytes

(�������� ������ �������� (n ������) ����������� �� m ������)

�� ��������� ������. �������� ������ �������� ����������� �� �������� 1024, 2048, 4096, 8192 ��� 16 384 — ������� ����� � ���������

Page size specified (n) greater than limit (16 384 bytes)

(��������� ������ �������� (n) ������ ������������� �������� (16 384 ����))

������� ������ �������� 1024, 2048, 4096, 8192 ��� 16 384

Password parameter missing (����������� �������� ������)

����������� ��� �������������� ���������� � ���������� �������. ����������� ������������� -password � ������� ������

Protection is not there yet (������ ���� �� ����������)

������������ ��������������� �����

-unprotected

Redirect location for output is not specified

(��������������� ���������� ��� ������ �� ������)

�� ������ �����, ����������������� ��� �������� ������������� � Firebird

REPLACE specified, but the first file <Jstring> is a database

(������ REPLACE, �� ������ ������ <������> �������� ���� ������)

���������, ����� ������ �����, ��������� �� ������� -replace, ��� ���� �����, � �� ���� ������

Requires both input and output file names

(��������� ����� ��� ��������, ��� � ��������� �����)

������� ������� � �������� ���� ��� ����������� � ��������������

RESTORE: decompression length error (RESTORE: ������ ����� ������������)

�������� ��������������� ������ gbak, ������������ ��� ����������� � gbak, ������������ ��� ��������������. ���������, ��� �� ����� -expand ����� ��� �����������

 

Restore failed for record in table <string>

(������ ��� �������������� ��� ������ �� ������� <������>)

�������� ���������� ������ � ��������� �������

Skipped n bytes after reading a bad attribute n . . .

(��������� n ���� ����� ������ ��������� �������� �)

�� ��������

Skipped n bytes looking for next valid attribute, encountered attribute m …

(��������� n ���� ��� ������ ���������� ������� ��������, �������� ������� m)

�� ��������

Trigger <string> is invalid . . . (������� <������> �������)

 

Unexpected end of file on backup file

(�������������� ���������� ����������� �����)

�������������� ����� ����� ����������� � �������; ������ ��������� �����������, ������� ������� ���� ���� �����, ����������� �����������. ���� ��������, �������� ����� ���� ����� � ����������� ��� ��� �������������� ���� ������

Unexpected I/O error while accessing <string> backup file

(�������������� ������ �����/������ ��� ��������� � ����� ����� <������>)

��������, �������� ������ ����� ��� ������� ������������ ��� ���������� ����������� ��� ��������������

Unknown switch <string> (����������� ������������� <������>)

��� ����� �������������� �������� gbak �����

User name parameter missing (����������� �������� ��� ������������)

����������� ��� �������������� ���������� � ��������� ������. ������� ��� ������������ �������������� -user

Validation error on column in table <string>

(������ �������� ������� � ������� <������>)

���� ������ �� ����� ���� �������������, ������ ��� �������� ������, ������� �������� ����������� �����������. ����������� ������� ����������� �� ����������, ������ ��� �������������� -no_validity

Warning — record could not be restored

(�������������� — ������ �� ����� ���� �������������)

�������� ���������� ��������� ������

Wrong length record, expected n encountered m . . .

(�������� ����� ������, ��������� n, ����������� m)

 

���� ������

������� gbak ����� ������� �������� ��� ����������� ���� ������ � ��������������� ��������� � ��� ���������� ��������� ����� ���������� ������. ������ ������������, ������� �� ������ ������������ ��� ���������� ����� �����������������, ������� � �������������� ���� ������, �������� ��������� gfix, ����������� ������. ��������������� ������������� gfix � gbak ��� ������� � ������ ������� ����������� ���� ������ ����������� � ���������� 4.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Gbak error gds receive failed
  • Gbak error expected backup version 1 9 found 10
  • Gbak error expected backup description record
  • Gb70 noco genesis индикатор ошибки
  • Gazlux standard ошибка e1

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии