Koozali.org: home of the SME Server

Upgrade? or restore from tape - any experiences?

Kelvin

Re: Upgrade? or restore from tape - any experiences?
« Reply #15 on: September 21, 2003, 02:09:13 PM »
Michiel,

Thank you ! I was not aware the LAT had a dump option (I was only aware that you can create users from a list provided to it). Does it also copy pseudonyms as well ?

I will test it out and provide you with feedback when next I get a moment (catching up on tax work at the moment :) ).

Kelvin

Michiel

Re: Upgrade? or restore from tape - any experiences?
« Reply #16 on: September 21, 2003, 02:19:10 PM »
> it). Does it also copy pseudonyms as well ?
The whole set: quota, pseudonyms, ibays, hostnames and domainnames.

Kelvin

Re: Upgrade? or restore from tape - any experiences?
« Reply #17 on: September 21, 2003, 02:29:46 PM »
Hi Michiel,

>The whole set: quota, pseudonyms, ibays, hostnames and domainnames.

OK.

Is it possible to exclude things like ibays, hostnames and / or domainnames ? I'm thinking further ahead and planning on extending the use of the export / import feature to allow say username updates on multiple servers, ie. schedule a regular export of the usernames / groups / pseudonyms / passwords to a file which is copied to one or more servers which then imports them regularly so that each of the servers have the same set of users / groups / passwords. Of course, we can script in some smarts to check if the exported file is any different to a previous exported file before sending the file out to the other servers so that they don't have to reimport the file if no changes exists.

Kelvin

Michiel

Re: Upgrade? or restore from tape - any experiences?
« Reply #18 on: September 21, 2003, 03:34:44 PM »
lat-dump will create different input-files for each of the tools, i.e. host.Users for the user accounts, host.Pseudonyms for the pseudonyms, etc. You only use those you need and can safely igonore the rest.

I guess your exporting scheme should work, but I can see one caveat. Lat-dump will only create a list of existing users, so if an account is deleted on the master server the slaves will not necessarily know they have to delete that user. You probably could solve that by running lat-dump on both machines and do a diff on the results.

Michiel

Kelvin

Re: Upgrade? or restore from tape - any experiences?
« Reply #19 on: September 21, 2003, 03:40:25 PM »
Hi Michiel,

>if an account is deleted on the master server the slaves will not necessarily know
>they have to delete that user

Good point. Goes to understanding the dump and import process.

It's still early days yet on the plan to do multi-server account sync. Will give it more thought when the time comes and will post results and scripts back to contribs if successful.

The more immediate plan will be to test single server account backup and restores.

Kelvin

Ray Mitchell

Re: Upgrade? or restore from tape - any experiences?
« Reply #20 on: September 23, 2003, 09:29:20 AM »
My experiences with backup and restore show that if you restore to an existing server with accounts etc, then the restored stuff is additive to what's already there.
That's why Mitel say to restore to a freshly installed OS, (which does not have accounts and ibays etc) and that way you end up with only the accounts etc that were in the restore file.

Seems to me you would have to delete all the existing accounts before you import new ones.

Regs
Ray

Kelvin

Re: Upgrade? or restore from tape - any experiences?
« Reply #21 on: September 23, 2003, 01:58:12 PM »
G'Day Ray,

>Seems to me you would have to delete all the existing accounts before you
>import new ones.

I did think of this as well in passing. However, I would imagine, there would need to be a process whereby the exported file(s) will need to be "intelligently" cut down or somehow processed into "to-be-imported" and "to-be-deleted" lists before sending across to the down-level servers, again, something to be further examined in more detail down the track.

Kelvin

Ray Mitchell

Re: Upgrade? or restore from tape - any experiences?
« Reply #22 on: October 02, 2003, 12:15:35 PM »
Kelvin
This rpm at
http://nx.dyndns.info/

nx-sme-adduser-1.0.2-0.noarch.rpm

looks interesting. I have not tried it.
Looks like part of the procedure has already been done, just a matter of easily getting the existing users (for transfer) into the csv file, but perhaps that's where the lat dump function comes in.

Regs
Ray


The doco says:
Automatically adds new users on a SME server from a CSV input file

Invocation: csv-adduser file.csv [delete]

With the delete option the script delets all user accounts found in the CSV file.
There is no further confirmation needed. Use carefully!

Format of the CSV-File:
----------------------
Each field must be quoted by double quotes. Fields must be seprarated by commas.
Spaces around the commas ar not allowed.

1. Line (Header):
"user","groups","password","City","FirstName","Phone","Street","Company","Dept","LastName"

The columns "FirstName", "LastName" are mandatory, all other are optional.
Is the "user" column not provided, the script generates a username, using the following rule:
First character of the firstname appended with up to 7 characters of the lastname
Example: Joe Sixpack --> jsixpack, Mary Foo --> mfoo
Is the "passowrd" column not given, the script generates it and write a list of all
passwords to /home/e-smith/files/users/admin/home/defaultpassword.csv and to
/home/e-smith/files/users/admin/home/defaultpassword.rtf for printing using a
word-processor program.

2. Datalines:
Each dataline contains the user data for the account to add. Empty fields "" are allowed.
The column count of the datalines must match the count of the header line.
In all columns german umlauts were converted (ä->ae, ß->ss etc.)
Groups must be created manually in the server-manager, before running the script!

Kelvin

Re: Upgrade? or restore from tape - any experiences?
« Reply #23 on: October 03, 2003, 12:37:44 PM »
Thanks for the info Ray. Much appreciated.

Other projects have got most of my time currently, so I have not been able to look into this again at the moment. I will once things quieten down again.

Cheers,

Kelvin