Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Tor Tveitane on December 20, 2003, 04:02:46 AM

Title: Backup only users, groups and information bays...
Post by: Tor Tveitane on December 20, 2003, 04:02:46 AM
Hi,

I thought I had seen somewhere a contrib to do selective backups.  But I can't find it now.

I need to backup all the user data,  groups and the information bays and *not* any other configuration data.

What I try to achieve is to restore all user data on a 'clean' and configured new install.

Thanks for any hint how to do this.  

I know about the lazy admin toolkit but apparently it isn't yet compatible with v6 final.

kind regards

Tor
Title: Re: Backup only users, groups and information bays...
Post by: Ianluis on December 23, 2003, 06:59:36 PM
I rather use Tapeware for backups thatn anything else.........
Title: Re: Backup only users, groups and information bays...
Post by: Arne on December 24, 2003, 12:40:46 AM
Hei Tor !

I think you must be refering to this contrib that has such a selective backup option:

http://mirror.contribs.org/smeserver/contribs/dmay/mitel/contrib/Backup2ws/

I don't know if it works with the 6.0 also but I think the chanses are good.

I am working on a backup to a USB HD project. I think the connection to the HD runs ok, but I dont know which files to backup, exept for of course the user datas.

What about things like user acounts, groups etc, where can that be found ??

Is there other certain files or directories that will be smart to back up ?
Title: Re: Backup only users, groups and information bays...
Post by: Arne on December 24, 2003, 01:57:20 AM
About the files .. actually you can read that from the config part of the backup2ws, as the default settings, I thin, so this should not be a big isue ..

But what aout the restore .. how do you do a restore with backup2ws and many restore volumes ??
Title: Re: Backup only users, groups and information bays...
Post by: Graham on December 24, 2003, 10:36:39 PM
Just a thought . . .

Have you tried Arkeia ?

The light version is free.

You install the deamon on your SME and the GUI portion
on your Win WS.

It can do BU to File (altho I am using SCSI tape VXA-17)

Also, the navigator can see your entire Linux FS and you can
create a 'savepack' of just the data you want :)

I know there are some SME specific Arkeia rpms out there . . .
Title: Re: Backup only users, groups and information bays...
Post by: Ray Mitchell on December 25, 2003, 09:12:30 AM
If you install backup2ws and then create the 911 disaster Recovery job, you will see which files/folders are essential to completely backup a server  and restore it to its identical condition (this includes configuration settings)

eg
/home/e-smith
/home/netlogon
/etc/e-smith/templates-custom
/etc/e-smith/templates-user-custom
/etc/group
/etc/gshadow
/etc/passwd
/etc/shadow
/etc/smbpasswd
/etc/ssh
/opt
/root

You can modify this list if you wish to limit the backup to the configuration files only and no data.
Backup2ws will allow you to exclude certain folders and files.


The LAT contrib is the closest thing for ONLY backing up the users, groups & ibays, you will just have to wait for the v6.0 compatible version.

This has been discussed a fair bit in these forums, search if you want more background, but as fas as I know there has been no definitive answer (ie contrib or method) as yet other than LAT, which is a series of steps rather than a 1 button backup function.

Regs
Ray
Title: Re: Backup only users, groups and information bays...
Post by: Adrian Ball on January 05, 2004, 05:00:32 PM
I had to upgrade to v6.0 to add a mirror disk (which wasn't supported in the kernel used in 5.6), hence had to backup/recover.
My backup was done using the 'backup to desktop' option, which saves everything...
To recover, I had to install the clean new SME6, transfer the backup file over, extract the directory tree into a temporary area (using cpio), recreate the user accounts/i-bays by hand (tedious indeed), then copy the required files from the temporary area to their final location.

Not the most elegant solution, but it worked...
Title: Re: Backup only users, groups and information bays...
Post by: Tor Tveitane on January 05, 2004, 06:30:57 PM
Arne wrote:


> What about things like user acounts, groups etc, where can
> that be found ??
>
> Is there other certain files or directories that will be
> smart to back up ?

Hi Arne,

I did a lot of research on this issue more than a year ago with ver 4.1.2.  I saved a disk image and added one user and entered his password.  Then I did a diff to check which files and folders that had changed.  Finally I had a script that copied everything that had changed - apparentluy ;-)  I was able to log in and read email messages etc, but the system was somewhat unstable so I'm sure I had missed something.  The tricky part is when trying to copy the password data from all its different folders.  It easily comes out of sync.

This is why I try to have an 'approved' solution and I'm looking forward to the LAT contrib - if it will be adapted to v6final.

As of 'important' data you'll find most of it in /home/e-smith/files, also /etc/e-smith/custom templates if you have added templates etc to the config.  

rgds

Tor
Title: Re: Backup only users, groups and information bays...
Post by: Ray Mitchell on January 06, 2004, 01:57:01 AM
Adrian
Why didn't you just do a restore from the "desktop backup file" as well ?

For others

An alternative is to temporarily move all the ibay data, then do a backup to desktop, assuming there is not a lot of data in the user folders, and also assuming your resultant backup file is less than 2Gb (it won't restore properly if it is bigger).
Then move your ibay data back to original location.

Restore the backup file on the "new" server and then copy the ibay data from old to ne server.
If you are rebuilding the "old" server then you may need to copy ibay data temporarily to a Windows workstation share and copy it back from there to the "new" server..

The new server configuration will be identical to the old server, so you may need to run the Configuration step again to setup the new server appropriately, and check other settings in server manager..

Thanks to Stephen Noble for the suggestion
http://forums.contribs.org/index.php?topic=20072.msg78935#msg78935

mkdir /tmp/ibays
mv /home/e-smith/files/ibays/xyz /tmp/ibays
mv /home/e-smith/files/ibays/abc /tmp/ibays

Then do the backup of ibays or whatever
when finished to return the folders to original do:

mv /tmp/ibays/xyz /home/e-smith/files/ibays/
mv /tmp/ibays/abc /home/e-smith/files/ibays/

Regs
Ray Mitchell
Title: Re: Backup only users, groups and information bays...
Post by: Adrian Ball on January 06, 2004, 03:01:04 PM
Restore from desktop didn't work - no processes were started on the server.  Copying the cpio file over and restoring by hand (it's only a one-liner after all) worked, but caused damage to config files due to the differences between 5.6 and 6.0.  
I had the choice of spending time undoing the config file damage or recreating the accounts and ibays and repopulating them from the backup (which apart from the file extraction time) was only about 20 minutes work, since there are only 4 users and 6 ibays.  I wanted to maintain the vanilla v 6 install as far as possible, hence I chose the latter course of action.
My only other way of doing it would have been to upgrade the unmirrored 5.6 to 6.0, then set up the mirroring manually, but I think this may have led to future upgrade problems if the RAID set up was not the same.

Regards,
Ade
Title: Re: Backup only users, groups and information bays...
Post by: Arne on January 06, 2004, 04:50:05 PM
I think it might be one thing missing. The content og the database files, users mail etc.

(I think singal-event prebackup makes this database dump automatic.)

I dont know if it should work to install a ordniary backup from a 5.6 to a 6.0

I tried to do this using rsync. What I discovered was that the file and directory structure around the area ibays/primary were different on the 6.0 compared with the 5.6 so the I ended up with a double set of primary directory and a installation that did not work.

Used rsync to restore backup between two 5.6 and this worked without a problem.

I find it diffucult to understand how it is possible to restore a 5.6 backup to a 6.0 installation as long as the directories/location of the files are not the same on these two distributiond (ibays/primay area)
Title: Re: Backup only users, groups and information bays...
Post by: Tor Tveitane on January 06, 2004, 06:32:07 PM
Ray Mitchell wrote:

> Adrian
> Why didn't you just do a restore from the "desktop backup
> file" as well ?
>
> For others
>
> An alternative is to temporarily move all the ibay data, then
> do a backup to desktop, assuming there is not a lot of data in
> the user folders, and also assuming your resultant backup file

Well,  the reason why I started this thread is that I'm a Linux newbie.  I'm still in the process of experimenting more or less successfully with configurations, new utilities and contribs.

From time to time I need a way to restore my system to a known point of departure, i.e. currently a fresh v6final install with my choice of contrib rpms and custom templates.  Nothing left of my more or less successful tweaking of the system in order to learn more ;-)

However after such a clean install, of course I want all my users, their email messages, home folders, passwords etc *automatically* ;-) restored.  This is where I need LAT or something similar.   Hope I expressed myself more clearly this time.

To those of you having problems migrating email messages from v5 to v6 I can tell that I used IMAPCopy with success for that.

kind regards

Tor
Title: Re: Backup only users, groups and information bays...
Post by: Ray Mitchell on January 07, 2004, 05:16:51 AM
Adriane & Arne

I did a backup to desktop on a v5.6 box and then restored from desktop on a freshly installed v6b3 box and it worked perfectly.
Everything was put in the correct places including the primary folder.
The server did not have a lot of data (backup file size approx 20Mb).
It should work on v6.0 final as that is essentially the same as v6b3.


Tor

A good way to bring a test server back to a known configuration ie with certain rpms already installed etc (as desired) is to create a Ghost image of the hard disk using Norton Ghost or similar. If you don't have much data in ibays, it will only use 1 CD.

Do all your test reconfiguration, stuff ups etc and when you want, just reGhost the image from CD to hard drive.

I use this technique and it saves a lot of reinstall time.

Regs
Ray
Title: Re: Backup only users, groups and information bays...
Post by: Tor Tveitane on January 07, 2004, 08:23:00 AM
Ray Mitchell wrote:


> Tor
>
> A good way to bring a test server back to a known
> configuration ie with certain rpms already installed etc (as
> desired) is to create a Ghost image of the hard disk using
> Norton Ghost or similar. If you don't have much data in ibays,
> it will only use 1 CD.
>
> Do all your test reconfiguration, stuff ups etc and when you
> want, just reGhost the image from CD to hard drive.

Ray,

... and then loose all new users, user edits and all changed user data (files, messages) done since I took the image.  That's why I want to take a snapshot of the user data when I have disconnected the server just before I reinstall from scratch.  With the new install I restore the user data before I reconnect the server to the LAN and the internet.  This way I loose no user data and we're up and running immediately.

I hope you understand my point.

kind regards

Tor
Title: Re: Backup only users, groups and information bays...
Post by: Sexton on January 07, 2004, 11:28:19 PM
Tor:

I installed SME 6.0 a few days ago.

Using 5.1.2, I used "backup to desktop" to save the files.

When I go to restore, I get an error due to something in the archive and then restore terminates.

I have copied smeserver.tgz to the server, expanded the files into a new directory, and then tried to move or copy the files by hand to the original destinations.  However, I get a message that says that files cannot be overwritten.

It is possible that your use of cpio may help me to restore the system.

Please explain the steps (and cpio command) that you used to restore the your files.

Note, my e-mail is broken due to the server being down.

Thanks,

Bob
Title: Re: Backup only users, groups and information bays...
Post by: Tor Tveitane on January 09, 2004, 12:09:27 AM
Sexton wrote:

> Tor:
> Please explain the steps (and cpio command) that you used to
> restore the your files.

Bob,

It was Adrian who used cpio.  Hope he bumps in and answers.

Tor
Title: Re: Backup only users, groups and information bays...
Post by: Ray Mitchell on January 09, 2004, 01:26:50 AM
Michiel has just annouced an update (beta rel) of LAT for v6.0

see

http://lists.contribs.org/mailman/public/devinfo/msg06673.html

Regs
Ray