10-25-2015 06:44 PM
I have a directory that has been set immutable with chattr:
chattr -i /some_directory
I do a save with Netbackup 7.7 . During a restore, with -L logging bprestore issues a complaint of the form:
18:29:10 (857.001) Couldn't change access and modificaiton times of some_directory: Operation not permitted
The bprestore exits non-zero.
On the one hand, this makes sense since the modification time of the directory should be updated, but it cannot because of immutability. On the other hand, the idea is to put everything back the way it was, so maybe bprestore should attempt to remove the immutability bit, adjust the times, then put back the immutability bit.
Does it matter that I'm also renaming files with -R so that /some_directory becomes /other_directory/some_directory ?
Is there an undocumented bprestore option that handles this?
I suppose that one option is to just ignore the nonzero return value from bprestore. But that masks othe restore failures.
Thanks
Solved! Go to Solution.
10-27-2015 03:22 AM
"On the one hand, this makes sense since the modification time of the directory should be updated, but it cannot because of immutability."
Is the True case as per my understanding...
the only option that i am seeing it to ignore it when restoreing the immutable attribute files/directories.
10-27-2015 07:18 AM
For redirected restores... here's my snippet. Granted, this is for a redirect restore from another server, but serves same purpose.
/usr/openv/netbackup/bin/bprestore -B -C <Source Server> -D <Box your on> -L /tmp/restore.log -s 10/20/2015 00:00:00 -e 10/20/2015 23:59:59 -R /home/netbackup/rel/rel1 -f /home/netbackup/prd/prd1
Contents of rel1
change /source/prd to /destination/stage
Contents of prd1
/source/prd
10-27-2015 03:22 AM
"On the one hand, this makes sense since the modification time of the directory should be updated, but it cannot because of immutability."
Is the True case as per my understanding...
the only option that i am seeing it to ignore it when restoreing the immutable attribute files/directories.
10-27-2015 07:18 AM
For redirected restores... here's my snippet. Granted, this is for a redirect restore from another server, but serves same purpose.
/usr/openv/netbackup/bin/bprestore -B -C <Source Server> -D <Box your on> -L /tmp/restore.log -s 10/20/2015 00:00:00 -e 10/20/2015 23:59:59 -R /home/netbackup/rel/rel1 -f /home/netbackup/prd/prd1
Contents of rel1
change /source/prd to /destination/stage
Contents of prd1
/source/prd