FASTBCP_BACKUP_RESTORE_MODE
Overview
--connectiontype backup_mssql (since FastBCP 1.6.7) and --connectiontype backup_rman (since FastBCP 1.6.8) read the latest version of a table among the files you give them. When a backup that could be the newest cannot be used, the export fails and names it, rather than reading older data without saying so.
The FASTBCP_BACKUP_RESTORE_MODE environment variable changes that without touching the command. Set it to best_effort to skip that backup and read the newest version that can be used.
Syntax
- Windows
- Linux
$env:FASTBCP_BACKUP_RESTORE_MODE = "best_effort"
export FASTBCP_BACKUP_RESTORE_MODE=best_effort
Configuration
| Property | Value |
|---|---|
| Values | strict or best_effort, in any case. Any other value stops the run at startup with a message naming the variable |
| Default | Not set: strict |
| Applies to | --connectiontype backup_mssql (since 1.6.7), --connectiontype backup_rman (since 1.6.8) |
| Since | FastBCP 1.6.7 |
| Value | A backup that could be the newest and cannot be used |
|---|---|
strict | The export fails, naming the backup, and the logs say what can be done about it |
best_effort | It is skipped, and the newest usable version is read, however old |
With backup_rman, this applies to an incremental backup whose level 0, or a level in between, is missing, and to a backup set that lacks a piece or is still being written. The tables of the other datafiles are read either way.
What FastBCP Logs
At the start of each export:
Backup version to read : restore point "latest", restore mode "strict"
With strict, a refusal is followed by a warning with the ways out. With best_effort, a warning at the start of each export says that older rows may be read.
best_effort skippedThe backups skipped are reported on the standard error output only, not in the FastBCP logs. A job that captures only the logs sees that this can happen, not that it did: keep the standard error output of the job if you use this mode.
best_effort needs another version to read. A SQL Server full backup alone that lost the end of its file fails with this mode too, and the logs then point to FASTBCP_BACKUP_RESTORE_POINT=full.
With --sourceconnectstring
An adbc.arpemsbackup.restore_mode option (backup_mssql) or adbc.arpeorabackup.restore_mode option (backup_rman) in --sourceconnectstring wins over the variable.
See Also
- SQL Server backups that cannot be used
- Oracle RMAN backups that cannot be used
- Upgrading to 1.6.7 (
backup_mssql) - Upgrading to 1.6.8 (
backup_rman)