ldmwndletsm
ADSM.ORG Senior Member
- Joined
- Oct 30, 2019
- Messages
- 232
- Reaction score
- 5
- 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.
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.