For either backup or restore, offline is the default option
BACKUP: basic command is as follows
----------
backup database <database name> to <target dir> (offline backup)
For Online backup:
backup database <database name> online <target dir>
Note: For enabling online backups, archival logging must be enabled. i.e do
update dbm cfg using logarchmeth1 TSM
RESTORE: basic command
-----------
RESTORE database <database name> FROM <source_dir>
source_dir: Is the directory where your backup image is located. If there are more than one backup images in this source directory, use timestamp of when the backup is taken as follows
RESTORE database <database name> FROM <source_dir> taken at <timestamp>
Online RESTORE command is as follows:
RESTORE database <database name> online FROM <source_dir> taken at <timestamp>
Thanks,
Madhavi