• 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.

Can you restore just the files under a directory?

ldmwndletsm

ADSM.ORG Member
Joined
Oct 30, 2019
Messages
165
Reaction score
1
Points
0
How in dsmc can you tell it to restore just the contents under a subdirectory but not the subdirectory itself?

For example, I want to restore /data/year/1997/* to /data/year/1997, but I don't want to restore 1997 itself? I don't want to end up with /data/year/1997/1997 (I guess I could move the files one level up and then delete the lower level 1997 directory, sure), and I don't want to change the settings on the 1997 directory that's already out there on disk. I don't want it replacing the 1997 directory.

I could create a temporary directory under that same file system, recover everything there and then move (atomic operation) the files to the desired location, leaving only the 1997 directory in the temp location, and then I delete that and the temp directory.

Is there an easier way? I'm thinking in the rsync mode where you can specify a trailing slash or not depending on whether you want to copy only the contents or the contents and the source directory.
 

Sunhillow

ADSM.ORG Senior Member
Joined
Oct 27, 2003
Messages
375
Reaction score
7
Points
0
Location
Stuttgart, Germany
Hi, if you want to restore to the original directory it is not necessary to specify the target. To original directory is the default ;)
 

ldmwndletsm

ADSM.ORG Member
Joined
Oct 30, 2019
Messages
165
Reaction score
1
Points
0
Eureka! Now that I know that, I just went through the dsmc help pages, and this is all buried down in there. I also see there's a dirsonly counterpart. Didn't look hard enough the other day. I will test this out tonight.

It's easy to find all this in the online documentation after the fact, but it was eluding me earlier. The adsm group to the rescue. :)
 

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 18.2%
  • Keep using TSM for Spectrum Protect.

    Votes: 61 61.6%
  • Let's be formal and just say Spectrum Protect

    Votes: 12 12.1%
  • Other (please comement)

    Votes: 8 8.1%

Forum statistics

Threads
31,748
Messages
135,357
Members
21,744
Latest member
tsm
Top