Knowledgebase: Tips and tricks
Changing User/Group file attributes during restore
Posted by Sven Koester on 19 June 2008 15:42
During file restore, PresSTORE restores all file attributes, including the user and group attribute, as they were on the file that was originally saved.
From PresSTORE 3.0.6 on, the user and group file attributes can be changed during restore operations on Unix hosts.

This is helpful e.g. when a different user that the one who owned the original files files wants to restore them (and could not access them otherwise),
or when restoring files from a different computer.
The way this is implemented is a mapping from the original user and group id to a new id.

The setup is done in the configuration file
/usr/local/aw/conf/lexxsrv.8000

To enable mapping, add the following lines:

ns_section ns/server/$server/module/jobex/restore/localhost
ns_param userMap "mymapping"
ns_param groupMap "mymapping"


The line userMap defines the user id mapping, the line groupMap the group id mapping. Each of the two lines can be omitted, in which case PresSTORE keeps the original user or group.
Each mapping, in the above lines shown as "mymapping" is
declared to have the following format:
"original-id-1 replacement-id-1"
"original-id-2 replacement-id-2" "original-id-3 replacement-id-3" ...

The placeholder "-1" stands for any id, e.g. the following line:
ns_param groupMap "-1 100"
defines a mapping from any group id to the id 100.

The following map:
ns_param userMap "0 500 100 100 101 105 -1 110"
defines the following conversion:
  • All files of root (id 0) are changed to user id 500
  • All files of user 100 keep the user id
  • All files of user 101 are changed to user id 105
  • All other files are mapped to the user id 110

The section heading in the above

ns_section ns/server/$server/module/jobex/restore/localhost


refers to the host "
localhost". In case the mapping shall be applied on a different host, enter that hosts client name (from the PresSTORE Client list) instead of the "localhost".



(524 vote(s))
Helpful
Not helpful

Comments (2)
Henrik Cednert
26 October 2013 13:05
Can "localhost" in 'ns_section ns/server/$server/module/jobex/restore/localhost' in some way be replaced with "any host"...?
Andre Kuehnemund
19 November 2013 17:00
Please see the last sentence in the above article:

"... refers to the host "localhost". In case the mapping shall be applied on a different host, enter that hosts client name (from the PresSTORE Client list) instead of the "localhost"."
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).