Ah, you are right, I miss read what he was asking for. I
agree that the best way is to delete everything then restore the needed files.
Regards,
Patrick Whelan
VERITAS
Certified NetBackup Support Engineer for UNIX.
netbackup AT whelan-consulting.co DOT uk
From: Jeff Lightner
[mailto:jlightner AT water DOT com]
Sent: 10 July 2007 16:28
To: Patrick; Sixbury, Dan; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Question on restore options.
Could you expand on that a little? I’ve not used
true-image but the following from the bprestore man page doesn’t suggest
to me that it does what the OP asked:
“-T Specifies a
true-image restore, where only files and
directories that existed in the last true-image backup are
restored. This option is useful only if true-image backups
were performed. If this option is not specified, all files
and directories meeting the specified criteria are restored,
even if they were deleted. When the -T option is specified,
the image requested must be uniquely identified. Unique
identification is accomplished by using the -e option with
seconds granularity. The -s option, if any, is ignored. The
seconds granularity of an image can be retrieved by using
the bplist command with the -l and -Listseconds options.”
He asked for something that would automatically delete files that
are already on the target. The discussion of deletion above is
merely to say it restores even if the files were previously deleted from the
target which isn’t the same thing. Am I missing something or
does the man page not tell the full story?
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Patrick
Sent: Tuesday, July 10, 2007 11:14 AM
To: 'Sixbury, Dan'; veritas-bu AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Question on restore options.
This is called True Image Recovery. If you have this option
turned on then it should do what you want.
Regards,
Patrick Whelan
VERITAS
Certified NetBackup Support Engineer for UNIX.
netbackup AT whelan-consulting.co DOT uk
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: 10 July 2007 15:56
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