cancel
Showing results for 
Search instead for 
Did you mean: 

bprestore and directories which have been set immutable with chattr?

cdkuser
Level 1

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

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

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

View solution in original post

DG-2005
Level 5

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

 

View solution in original post

2 REPLIES 2

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

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

DG-2005
Level 5

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