How to restore only what was backed up on a specifc night?

ldmwndletsm

ADSM.ORG Senior Member
Joined
Oct 30, 2019
Messages
232
Reaction score
5
Points
0
PREDATAR Control23

Is there a way to tell TSM to only restore the files that were backed up for a give file space or directory on a given date/time as opposed to rebuilding the entire file space or directory as of that date/time?

For example, a user adds 10 files to directory /filesystem/dir1 on Monday, an incr backup is take Monday night. The user then adds 100 files on Tuesday, and again, an incr backup runs Tuesday night. At this point, we have 110 files on top of whatever was already out there prior to Monday. On Wednesday, the user wants to recover the 10 files from Monday. Clearly, you could restore the directory as of Tuesday to another location, and the user could copy over the 10 files that they need and/or you could restore to the same area and answer 'No' when prompted to overwrite (however that works), but is there a more efficient way to do this?

The equivalent for EMC NetWorker would be a saveset recovery. Yes, there's the risk, particularly when you're doing this for multiple nights -- trying to string something together -- that you could pull back deleted files (something the point in time avoids), but there could be times when it might be nice to avoid having to rebuild the entire directory from that night, especially if there were already a million files out there as of Monday, and all you want is the 10.
 
PREDATAR Control23

Okay, so if I wanted to restore all the files (inactive and active) from the /whatever subdirectory that were backed up on July 29, 2019, then it would be something like:

restore -subdir=yes “/whatever/*” -dateformat=1 -fromdate=07/29/2019 -todate=07/29/2019

and if I wanted to include only the active ones then I would specify (not sure here?):

restore -subdir=yes “/whatever/*” -dateformat=1 -fromdate=07/29/2019 -todate=07/29/2019 -pitdate=07/29/2019
 
PREDATAR Control23

You typically don't use pitdate combined with fromdate/todate. You use pitdate or fromdate/todate

PITDATE is most commonly used. So if you do 07/29/2019, it will restore the most recent version of every file in /whatever backed up on or before 07/29/2019 regardless if they are active or inactive. So that essentially gives you all the files in /whatever as they were on the client during the backup 07/29/2019, assuming that they are not expired.

If you use todate/fromdate, it will restore files backed up between those 2 dates doesn't matter if active or inactive, you may want to use -latest in conjunction with that so that if there's more than 1 version in that time span that it restores the most current within that timeframe. Without latest, if there's 2 versions that match that time period, the first one will be restored, and you will be prompted to overwrite, rename or skip the second one.
 
PREDATAR Control23

Thanks. How then would you restore only the files between those dates *without* bringing back inactive ones? Is there some way to force it not to restore inactive ones?

Also, instead of using '-latest' could you accomplish the same thing by using the 'totime' to narrow the range down to where it would only find one version? Not sure, though, about 'fromtime'? I didn't see that parameter anywhere?
 
PREDATAR Control23

Thanks. How then would you restore only the files between those dates *without* bringing back inactive ones? Is there some way to force it not to restore inactive ones?
You don't know if you want active or inactive. Files that were active on 07/29/2019 are not necessarily active today.
Also, instead of using '-latest' could you accomplish the same thing by using the 'totime' to narrow the range down to where it would only find one version? Not sure, though, about 'fromtime'? I didn't see that parameter anywhere?
You should definitely use fromtime/totime otherwise it assumes the current time. If only one backup was run during that timeframe, then you should not be prompted to replace any files.
 
Top