Rather than do an rm why not just blow
away the filesystem(s) and recreate it (them)?
The only way I know to do what you’re
asking is with “rsync” but it would be slow itself and is not part
of NBU. You’d essentially have to restore to a clean set of directories
and do rsync from there (or just do rsync directly from Production without a
restore). rsync has a flag that tells it to delete items from the target
directory if they don’t exist on the source.
From:
veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Sixbury, Dan
Sent: Tuesday, July 10, 2007 10:56
AM
To:
veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Question on
restore options.
Is
it possible to restore a directory such that if files exist they are
overwritten, but if a file doesn't exist on the restore it is removed?
i.e.
System
A
System B
--------------
----------------
Directory
X
Directory X
File a
b c d File
a d
So
in this scenario you restore from System B to System A and since the files
"a" and "d" exist, they are overwritten, but files
"b", and "c" are deleted.
I
know the easy way (in theory) would be to delete the directory X on system A
and then do the restore from backup of system B, but we are cloning data from a
production system to a test system and there are thousands of directories with
thousands of sub-directories so doing a RM will take several hours to
complete. And the developers want to make sure that there isn't test or
development data left behind after the restore from the production server.
Thanks
Dan