Link to home
Start Free TrialLog in
Avatar of webforces
webforces

asked on

Windows / Linux / Samba Question about maintaining UID when backing up.

We are using Samba (smbmount) to backup a number of Windows shares to our Linux server.  

It works very well, and we can retrieve files very quickly.
However, we have hit upon a fundamental problem; when we backup the files, we can maintain the permissions, but not the orignial user (ownerships).  Therefore, if we ever needed to restore a whole data tree rather than adhoc, we would have to restore, then change the owners manually (ouch).

I know account info is held within the domain and that UIDs and GIDs can be complex on Active Directory, and that copying of files will always create the new (copied) file in the name of the copying owner (which is usually sensible in most cases).

Unfortunately some of this data is sensitive, and we do not want any human error with a manual restore.

Does anybody know a way of sustaining the UID and GID without having to resort to special backup software being installed on the PC with the shares (and creating a backup file, then moving it to the Linux server)?

NOTE: The Linux server is fully intergrated into the Domain (AD) and if any user writes to the server, an appropriate NT UID (Offset to the Linux UID) is set for the files ownership.

Surely the fact that the Linux server can maintain Windows UIDs must provide some hope that we can do this...

Give me that last 5% to make this project a success!!!!
SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webforces
webforces

ASKER

Yes, I agree that that would help.

However, the biggest problem I have is with SMBmount.
No matter how I try and pull the data over with it, the UID and GID is set to a single user (The smbmount login user), so it sets all UIDs to that one.

What I am after is a way of backing up the Windows shares to a Linux box, whilst preserving the UID (Even if the number is different from Domain at this time) handled within Samba (if poss), becase what we have at the moment is a tree of data with all the same UID.

Does that make more sense?

M
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thats a very thorough answer.  Ill give it a try over the next 2 days, and come back as I may have some smaller questions to tweak it.

Stay tuned...