Code samples, background information, and tips for standard backup options.
BACKUP DATABASE TO '/dev/rmt/0' TO '/dev/rmt/1' WITH COMMENT 'Jan 18 full backup of iquser'This example restores the database:
RESTORE DATABASE 'iquser' FROM '/dev/rmt/0' FROM '/dev/rmt/1'
BACKUP DATABASE INCREMENTAL TO '/dev/rmt/0' SIZE 150 WITH COMMENT 'Jan 30 incremental backup of iquser'The SIZE parameter specifies the maximum storage capacity per output device.
BACKUP DATABASE INCREMENTAL SINCE FULL TO '/dev/rmt/0' SIZE 10000000 TO '/dev/rmt/2' SIZE 15000000All blocks changed since the last full backup are saved to separate tape devices.
The READWRITE and READONLY keywords limit backups to read-write or read-only files or dbspaces. The read-write dbspaces and files must be SAP Sybase IQ dbspaces.
BACKUP DATABASE READONLY DBSPACES dsp1 TO '/dev/rmt/0'Restore the dbspace:
RESTORE DATABASE READONLY DBSPACES dsp1 FROM '/dev/rmt/0'
BACKUP DATABASE READONLY FILES dsp1_f1, dsp1_f2 TO 'bkp.f1f2'
BACKUP DATABASE READONLY DBSPACES dsp2, dsp3 READONLY FILES dsp4_f1, dsp5_f2 TO 'bkp.RO'