TSM / SP — Restore Cheat Sheet

dsmc restore reference for AIX clients — file, point-in-time, and image-mode patterns
Conventions used below: trailing / on a source means "contents of"; trailing / on a destination is required when restoring multiple objects. Replace SERVERNAME with the dsm.sys stanza you want (e.g. BC01_FILE for individual file restores, BC01_MFULL / BC01_YFULL for point-in-time from full backups). All examples use absolute paths — TSM does not interpret relative paths the way shell does. -pick opens an interactive picker; -pitdate / -pittime are for scripted point-in-time. -inactive shows expired/old versions; without it you only see the current active version.
dsmc

Two modes — interactive shell vs one-shot CLI

CommandDescription
dsmc -servername=BC01_FILEOpen dsmc prompt against a specific stanza
dsmc> q schedShow schedules associated with this node
dsmc> q mgmtShow active management classes and their bindings
dsmc> q backup /etc/passwdShow backup versions of a file
dsmc> q filespaceList filespaces backed up for this node
dsmc> quitExit the dsmc prompt
dsmc restore /etc/hosts -servername=BC01_FILESingle restore command, exits when done
dsmc q backup /etc/hosts -servername=BC01_FILESingle query, exits — useful in scripts
Tip: for any restore that's going to take more than a minute, run interactively (dsmc -servername=…) so you can inspect q backup output before committing to the restore. One-shot mode is for scripted/automated work where you already know exactly what you want.
query

Pre-restore — find what's actually there

CommandDescription
q filespaceList all filespaces backed up for this node
q filespace -detailShow last backup time and capacity per filespace
q backup /etc/List active backup versions in /etc/
q backup /etc/ -inactiveList active AND inactive (expired) versions
q backup /etc/ -subdir=yesRecurse into subdirectories
q backup /etc/hosts -inactiveAll known versions of a single file
q backup /db/data/ -inactive -subdir=yesFind a date that has the version you need
q backup / -inactive -fromdate=07/01/2025 -todate=07/15/2025Bracket the search to a date range
Always start here. You cannot restore what TSM doesn't have. q backup -inactive tells you what point-in-time versions exist before you commit to a restore. The output's "Backup Date" column is the timestamp you'll feed into -pitdate.
restore — directories

Restoring directories

CommandDescription
restore /etc/ -subdir=yes -replace=allRestore /etc and everything below it, overwriting
restore /home/ -subdir=yes -replace=noRestore but skip files that already exist
restore /var/log/ -subdir=yes -replace=promptPrompt per file before overwriting
restore /home/jim/ -subdir=yes -replace=allRestore one user's directory, recursive
restore /home/jim/docs/ -subdir=yesEven deeper — only the docs/ subtree
restore /home/jim/* -subdir=noOnly files directly in /home/jim, no subdirs
restore /home/jim/ /tmp/restore/jim/ -subdir=yesSource → destination — note trailing / on dest
restore /etc/ /restore_staging/etc/ -subdir=yes -replace=allRestore /etc to a staging area for review
restore /db/ /restore/db_2025-08-01/ -subdir=yes -pitdate=08/01/2025PIT restore to alternative location for diff
Trailing slashes matter. restore /etc/ /tmp/etc/ places the contents of /etc into /tmp/etc. restore /etc /tmp/etc (no trailing slashes) would create /tmp/etc/etc — usually not what you want. -subdir=yes is required for recursive restores; without it only the explicitly named directory's immediate contents come back.
restore — files

Restoring individual files

CommandDescription
restore /etc/hostsMost recent active version, original location
restore /etc/hosts -replace=allOverwrite without prompting
restore /etc/passwd -ifnewerOnly restore if backup is newer than local copy
restore "/var/log/*.log"All .log files — quote to prevent shell glob
restore "/var/log/*" -subdir=noEverything directly in /var/log, no recursion
restore "/etc/network/*.conf"Pattern match within a directory
restore /etc/hosts /tmp/hosts.recoveredRename on restore — different filename allowed
restore /etc/hosts /tmp/Same filename, different directory (note trailing /)
restore /db/conf/db.cfg /tmp/restore/db.cfg.20250801Restore + rename in one step
restore "/var/log/*.log" /tmp/log_restore/All matching files into staging dir
restore /etc/ /tmp/etc_recovery/ -subdir=yes -replace=allWhole tree to alternative — review then move
Always quote wildcards. restore /var/log/*.log without quotes lets the AIX shell expand the glob against the local filesystem first — meaning if /var/log is missing the .log files (which is why you're restoring them), the command becomes restore with no arguments. Quoting passes the pattern verbatim to dsmc, which then matches it against the server-side backup catalog.
restore — point in time

Restoring as of a specific date / time

CommandDescription
restore /db/ -subdir=yes -pitdate=08/01/2025Restore /db tree as it existed on 1 Aug 2025 (00:00:00)
restore /db/ -subdir=yes -pitdate=08/01/2025 -pittime=14:30:00PIT to a specific time of day
restore /etc/hosts -pitdate=07/15/2025Single file as of a date
restore /db/ /restore/db_pit/ -subdir=yes -pitdate=08/01/2025PIT restore to alternative location
-pitdate=MM/DD/YYYYUS format — TSM default. Locale-dependent
-dateformat=4 -pitdate=2025-08-01Force ISO format with -dateformat=4
-timeformat=1 -pittime=14:30:0024-hour clock with -timeformat=1
dsmc restore … -pitdate=… -servername=BC01_FILEFrom file-level node — PIT within last 30 days
dsmc restore … -pitdate=… -servername=BC01_MFULLFrom monthly node — PIT within last 6 months
dsmc restore … -pitdate=… -servername=BC01_YFULLFrom yearly node — PIT within last 7 years
PIT semantics: -pitdate tells TSM "give me the version that was active as of this date." If the file existed on that date, you get the version backed up most recently before that date. If the file was deleted before that date, you get nothing — the file's last known version had already aged out by your PIT marker. Always run q backup … -inactive first to confirm versions exist around your target date.
-pick

Interactive version picker

CommandDescription
restore /etc/hosts -pickOpen picker showing all active versions
restore /etc/hosts -pick -inactiveInclude inactive (expired) versions in picker
restore /db/ -subdir=yes -pick -inactivePick versions across a recursive restore
restore /home/jim/ -pick -inactive -fromdate=07/01/2025Filter picker to versions after a date
xMark/unmark current line for restore
up / down arrowsNavigate the version list
= (equals)Mark all entries
0 (zero)Clear all marks
oOK / proceed with marked entries
cCancel without restoring
When to use -pick: ad-hoc recoveries where you genuinely don't know which version is the right one (e.g. user says "the file was OK last week but corrupted this week" — pick lets you walk back through versions one at a time). For scripted/automated restores or anything in a runbook, use -pitdate / -pittime so the recovery is reproducible. -pick always implies an interactive terminal — won't work in non-interactive scripts.
cross-node restore

Restoring data from another node (DR / migration)

CommandDescription
(server) UPDATE NODE BC01_FILE NEWNODENAME=BC01_FILE_OLDRename old/dead node so you can re-register
(server) GRANT PROXYNODE TARGET=BC01_FILE_OLD AGENT=BC02_FILEAllow BC02_FILE to access BC01_FILE_OLD's data
(server) UPDATE NODE BC01_FILE_OLD HLADDRESS=<BC02_IP>If using -fromnode, set source node's HL addr
dsmc restore -fromnode=BC01_FILE_OLD /home/jim/ /restore/jim/ -subdir=yesPull old BC01 data onto BC02 — fully authoritative recovery
dsmc restore -fromnode=BC01_FILE_OLD -pitdate=07/15/2025 / -subdir=yesPIT restore from another node's backups
dsmc q backup -fromnode=BC01_FILE_OLD /home/Inspect the other node's backups before restoring
Use case: recovering a destroyed LPAR's data onto a replacement LPAR before the original node is rebuilt; or migrating user data from one host to another using TSM as the transport. The PROXYNODE permission is mandatory — TSM will refuse the restore otherwise. Always restore to an alternative location (/restore/...) first, validate, then move into place.
restore image

Image-mode restores — full filesystem recovery

CommandDescription
dsmc q imageList active image backups for this node
dsmc q image -inactiveInclude inactive (older) image backups
dsmc q image /dbImage backups of a specific filesystem
dsmc rest image /dbRestore most recent active image of /db
dsmc rest image /db -deletefilesRemove files added since backup (true mirror)
dsmc rest image /db -incrementalRestore image + incrementals on top — full PIT
dsmc rest image /db /restore_dbSource filespace → alternative mountpoint
dsmc rest image /db /dev/lv_recoverRestore directly to a raw LV — must be same size
dsmc rest image /db -pitdate=07/01/2025Image as it existed on a specific date
dsmc rest image /db -pitdate=07/01/2025 -pittime=22:00:00PIT to specific time
dsmc rest image /db -pickPick from available image versions
dsmc rest image /db -pick -inactivePick from active + inactive image versions
Critical pre-checks for image restore: the target filesystem MUST be unmounted before restore (umount /db) — otherwise you'll corrupt active data. The target LV must be at least the size of the original. Image restore is block-level — it overwrites the entire filesystem, including files you didn't want to touch. Use -incremental if you want image + post-backup file changes layered on top.
Image vs file-level restore — when to choose which: file-level restores are surgical (one file, one directory, no downtime). Image restore is whole-filesystem and requires unmounting — typical use cases are DR after total disk loss, recovering a corrupted filesystem, or rebuilding an LPAR's data volume from scratch. For a few files, always use restore; for a whole filesystem from a known-good point in time, image is dramatically faster than file-level recursive restore.
options

Common restore options reference

OptionEffect
-subdir=yes / noRecurse into subdirectories. Default for restore is no
-replace=allOverwrite without prompting (scripts)
-replace=noSkip files that already exist on disk
-replace=promptAsk per file (interactive only — default)
-ifnewerOnly restore if backup version is newer than file on disk
-inactiveInclude inactive/expired versions in picker or query
-pickOpen interactive version picker
-pitdate=MM/DD/YYYYRestore versions active as of date
-pittime=HH:MM:SSCombine with -pitdate for time-of-day precision
-fromdate / -todateFilter -pick or -inactive query to date range
-fromnode=<node>Restore data backed up by another node (proxynode)
-filelist=/path/list.txtRestore the list of files in the file (one per line)
-preservepath=subtreePreserve relative path under destination
-preservepath=completePreserve full source path under destination
-preservepath=noneStrip source path entirely (default for single files)
-tapeprompt=noDon't prompt for tape mounts (scripted restores)
-quietSuppress per-file output (good for large restores)
-verboseShow every file as it's restored (default)
-preservepath behaviour trips up most people on first use. With -preservepath=subtree and source /home/jim/ being restored to /restore/, files land under /restore/jim/.... With -preservepath=complete, files land under /restore/home/jim/.... With -preservepath=none, files land directly in /restore/ with no preserved structure (risky for multiple files — use only for single files).
troubleshooting

Common restore problems and what to check

SymptomLikely cause / check
"ANS1092W No files matching search criteria found"Wrong stanza — try -servername= against the right node. Or the path doesn't exist in backups: q backup <path>
"ANS1247E File not found" with -pitdateFile didn't exist on that date, or was deleted before it. Run q backup <path> -inactive to see actual version dates
Restore is extremely slowData tiered to COS — first read fetches from cloud. Subsequent reads are from local cache. Plan for slower first restore on aged data
Files restored to wrong location-preservepath misunderstanding, or trailing slash on dest missing — see -preservepath note above
"ANS1126E File exists, not replaced"Default -replace=prompt and you said no, OR -replace=no. Re-run with -replace=all if intentional
Image restore fails with "filesystem mounted"umount the target FS first. Image restore is block-level and requires exclusive access
"ANS1029E Communication with TSM server is lost"Server down, network issue, or schedule window collision. Check server-side actlog around the timestamp
Wildcards don't matchShell expanded the glob first. Quote them: restore "/var/log/*.log"
"ANS1898I" repeating in outputInformational only — large restore progress. Use -quiet to suppress
Server-side correlation: when in doubt, watch the TSM server's QUERY ACTLOG BEGINTIME=-00:30 while the restore runs — every client action shows up there with the matching session ID. ANR1xxxE messages on the server side will explain client-side ANSxxxxE messages with full context (e.g. why a session dropped, whether the server rejected an auth attempt).