• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

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

ldmwndletsm

ADSM.ORG Member
#1
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.
 

ldmwndletsm

ADSM.ORG Member
#3
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
 

marclant

ADSM.ORG Moderator
#4
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.
 

ldmwndletsm

ADSM.ORG Member
#5
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?
 

marclant

ADSM.ORG Moderator
#6
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.
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 18 19.6%
  • Keep using TSM for Spectrum Protect.

    Votes: 57 62.0%
  • Let's be formal and just say Spectrum Protect

    Votes: 10 10.9%
  • Other (please comement)

    Votes: 7 7.6%

Forum statistics

Threads
31,583
Messages
134,647
Members
21,649
Latest member
worblehat
Top