Backup Sources
FastTransfer reads tables directly from backup files: no restore, no running SQL Server or Oracle instance, no load on production. The backup you already take every night becomes a data source.
backup_mssqlADBCfull and differential backups (.bak), compressed, striped, encrypted or TDE ones included
backup_rmanADBCRMAN backup sets, full, level 0 and incremental level 1 to 4
The drivers are bundled in FastTransfer: there is nothing else to install. They return Arrow columnar data, like the ADBC sources, so the target must be an adbc_* connection type. Another target is refused before anything runs.
Backup sources run on Windows x64 and Linux x64.
Parameters
A backup source uses the usual source parameters, with these meanings:
| Parameter | Meaning for a backup source |
|---|---|
--sourceserver | Directory of the backup files |
--sourcedatabase | File names or patterns in that directory, separated by ; |
--sourceschema, --sourcetable | Table to read |
--query | SELECT * FROM [schema.]table or SELECT col, col... FROM [schema.]table. backup_mssql also takes TOP n. No other SQL: no WHERE, no join |
--sourceuser, --sourcepassword | backup_mssql, encrypted backup: the private key file of the certificate (.pvk, .pfx, PEM...) and its password |
--sourceconnectstring | Driver options, given directly. An option given there wins over the environment variables |
Which files to give:
backup_mssql: the full backup and its differentials, and every stripe. Example:--sourcedatabase "mydb_full.bak;mydb_diff_*.bak".backup_rman:*and?in a name,**for any number of directories, and a directory stands for its files. Example:--sourcedatabase "l0;l1/**".
An entry that matches no file stops the run, naming it.
SQL Server Backup to PostgreSQL
- Windows
- Linux
.\FastTransfer.exe `
--sourceconnectiontype "backup_mssql" `
--sourceserver "D:\MSSQLBACKUP" `
--sourcedatabase "tpch_full.bak;tpch_diff_*.bak" `
--sourceschema "dbo" `
--sourcetable "orders" `
--targetconnectiontype "adbc_pgsql" `
--targetserver "localhost:5432" `
--targetdatabase "tpch" `
--targetuser "postgres" `
--targetpassword "mypassword" `
--targetschema "public" `
--targettable "orders" `
--method "Physical" `
--degree 8 `
--loadmode "Truncate"
./FastTransfer \
--sourceconnectiontype "backup_mssql" \
--sourceserver "/backup/mssql" \
--sourcedatabase "tpch_full.bak;tpch_diff_*.bak" \
--sourceschema "dbo" \
--sourcetable "orders" \
--targetconnectiontype "adbc_pgsql" \
--targetserver "localhost:5432" \
--targetdatabase "tpch" \
--targetuser "postgres" \
--targetpassword "mypassword" \
--targetschema "public" \
--targettable "orders" \
--method "Physical" \
--degree 8 \
--loadmode "Truncate"
Oracle RMAN Backup to SQL Server
- Windows
- Linux
.\FastTransfer.exe `
--sourceconnectiontype "backup_rman" `
--sourceserver "D:\RMAN" `
--sourcedatabase "l0;l1/**" `
--sourceschema "TPCH" `
--sourcetable "ORDERS" `
--targetconnectiontype "adbc_mssql" `
--targetserver "localhost" `
--targettrusted `
--targetdatabase "tpch" `
--targetschema "dbo" `
--targettable "orders" `
--method "Physical" `
--degree 8 `
--loadmode "Truncate"
./FastTransfer \
--sourceconnectiontype "backup_rman" \
--sourceserver "/backup/rman" \
--sourcedatabase "l0;l1/**" \
--sourceschema "TPCH" \
--sourcetable "ORDERS" \
--targetconnectiontype "adbc_mssql" \
--targetserver "sqlserver" \
--targetuser "loader" \
--targetpassword "mypassword" \
--targetdatabase "tpch" \
--targetschema "dbo" \
--targettable "orders" \
--method "Physical" \
--degree 8 \
--loadmode "Truncate"
Parallel Read
A backup has no SQL engine, so the parallel methods that send a query do not apply. Two values are accepted:
--method | What it does |
|---|---|
None | One stream |
Physical | Each of the --degree streams reads one slice of the table: pages of a rowstore, rowgroups of a columnstore, ranges of Oracle blocks |
Which Version of the Data Is Read
FastTransfer reads the latest version the files hold: full backup plus differential, or level 0 plus incrementals.
A backup that could be the newest and cannot be used stops the run, naming it, and FastTransfer logs what can be done. The backup is opened and the table looked up before any pre-load step: a refused backup, or a table the backup does not hold, stops the run with the target untouched, --loadmode Truncate included.
| Environment variable | Effect |
|---|---|
FASTTRANSFER_BACKUP_RESTORE_MODE=best_effort | Read the newest usable version instead of stopping |
FASTTRANSFER_BACKUP_RESTORE_POINT=full | Read the last full (or level 0) backup and ignore the differential and incremental ones |
FASTTRANSFER_INDEX_DIR | Directory of the backup indexes |
The Backup Index
On the first read, the driver builds an index of each backup and saves it. This takes minutes on a large compressed backup; the next reads reuse the index and start at once.
The index is saved under %LOCALAPPDATA% on Windows, $XDG_CACHE_HOME or ~/.cache on Linux. Set FASTTRANSFER_INDEX_DIR to choose another directory. FastTransfer warns when the directory cannot be written.
backup_mssql: each compressed backup file is read by 2 threads when the backup is indexed, and the files of a striped backup are read at the same time. The driver option adbc.arpemsbackup.index_threads_per_backup_file (1 to 16), given in --sourceconnectstring, changes that number.
Limits
- The target must be an
adbc_*connection type. - Only
NoneandPhysicalparallel methods. - A query cannot filter or join: it selects columns of one table.
- Not available on Linux ARM64.