Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Cyrus Bharda on January 08, 2003, 04:24:10 AM

Title: Backup to Hard Drive
Post by: Cyrus Bharda on January 08, 2003, 04:24:10 AM
Is there a rpm that instead of backing up to tape, does the same except backs up to another hard drive? Wouldnt it be way cheaper (for small to medium servers) to go out and buy a removable HDD caddy and a big ide drive and then just backup to that? Is that possible?

Thanks,

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Des Dougan on January 08, 2003, 04:53:25 AM
There's a contrib hosted on the e-smith site (flexbackup to disk) which basically does what you want. You'd need to amend it somewhat if putting the removable disk in the same machine.


Des Dougan
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 08, 2003, 06:02:49 AM
I had a quick look for it but didnt find it, didnt look to hard, but when I googled e-smith flexbackup to disk I found your howto hosted on Darrell May's site:

http://myezserver.com/downloads/mitel/howto/flexbackup-to-disk-howto.html

and really that would be much better to do as then I could back it up to a share on my win2k box and then it would get backed up up again when it gets backed up.

My worry is what exactly does it backup (users, mailboxes, psyudonyms, installed rpm's, etc etc etc) and more importantly how do I the go about restoring it?

Thanks a lot for your help, muchly appreciated!!

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Des Dougan on January 08, 2003, 06:39:36 AM
Cyrus,

As it simply replaces the tape with a disk share, it backs up everything on the server (the default flexbackup backs up /boot and /)..

As far as restoring goes, have a look at this:

http://www.e-smith.org/docs/howto/contrib/flexbackup-restore-from-disk-howto.html

Des
Title: Re: Backup to Hard Drive
Post by: Des Dougan on January 08, 2003, 06:42:35 AM
I should also have noted that, although it hasn't been updated in a while, it should work on all versions, as there is nothing version-specific in the process.


Des
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 08, 2003, 07:28:35 AM
Just wondering if you were to restore from a shared mount wouldn't you need to do this step:

"
Setting up the mount and fstab

The Linux convention is to mount removable media from /mnt. Create a directory called /mnt/backup to act as mount point for the share created previously. Using your favourite editor, add an entry to /etc/fstab for the share:

[root@e-smith]# pico /etc/fstab

//servername/sharename  /mnt/backup  smbfs   username=name,password=pword

where "servername" and "sharename" are the name of the PC and the share you created previously. /mnt/backup identifies the mount point, while  the username and password pair are the userid and password used to logon to the PC (required for NT and Win2K systems).
"

instead of this step in the retore howto: ???

"
STEP 2: Creating the restore script
As root, in root's home directory, create the following script using your favourite editor:

[root@e-smith]# vi flexbackup_restore

mount /mnt/backup
cd /
/usr/bin/flexbackup -extract /mnt/backup/root.0.YYYYMMDD.dump.gz  -files /root/extract-list
umount /mnt/backup
"

Because in the second step it just says to mount /mnt/backup but if you have not put it in the fstab then you cannt mount it right?

Sorry for the newbie questions :-)

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Des Dougan on January 08, 2003, 08:17:47 AM
Cyrus,

As it says at the beginning:

STEP 1: Visit and implement this HOWTO:

http://www.e-smith.org/docs/howto/contrib/flexbackup-to-disk-howto.htm

STEP 2: Creating the restore script

So, yes you're correct to some extent - you have to do the steps in the first How To to set things up for the restore.

Regards,


Des
Title: Re: Backup to Hard Drive
Post by: jean on January 08, 2003, 08:59:29 AM
How do you schedule multiple "flexbackup-to-disk"?  A template having to do with cron?  I've been backing up to disk for a few weeks and am very happy with how it works.  Now, if I can only get it to backup 4 times per day...

Thanks for any help,
Jean
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 08, 2003, 09:16:01 AM
How cool is that! Thanks a lot for your help Des and thanks for writing those great howto's!!!!!!!

Cyrus bharda
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 15, 2003, 05:54:01 AM
Just another quick question about your howto Des:

Under the first part "Setting up the mount and fstab"
There you edit the fstab file, shouldnt we be creating a template for that instead of editing the /etc/fstab file?


Thanks again for the advice :-)

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 15, 2003, 06:07:07 AM
Oh and just another thing, after you edit the custom template /etc/cron.d/backup dont we have to expand that template so it changes the original file?

Sorry for being picky :-)

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 15, 2003, 06:10:02 AM


Nevermind, didnt finish reading the HowTo :-)


Hit the "Update Configuration" button.  This will expand the template and create the new /etc/cron.d/backup entry. That's it! Done, finished, complete.


Sorry :-)

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 15, 2003, 07:14:22 AM
Your Howto works absolutly perfectly with 5.5 :-)

Even tryed the restore and it also worked beautifully!!

Thanks again Des, muchly appreciated :-)

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: Des Dougan on January 16, 2003, 07:58:39 AM
/etc/fstab can't be templated, I believe. I seem to remember asking the same question  - it's required for the filesystems to be mounted before other services start.

Des
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 16, 2003, 09:16:46 AM
Doesnt matter it works BEAUTIFULLY!!

Thanks for the GREAT howto and support!!

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: elenezet on January 20, 2003, 04:01:13 PM
hello :o)

Ok it work fine but i have a question. If my server crash and i would like to restore data from backup. I do change from new install like indicate in the 2 how-to but how can i restore mysql base?
I have my extract-list like this:
/etc/e-smith/templates-custom
/etc/e-smith/templates-user-custom
/home/e-smith
/etc/ssh
/root
/etc/passwd
/etc/shadow
/etc/gshadow
/etc/group
/etc/smbpasswd
I feel as if mysql dump is in /etc/e-smith/db/mysql/ but what must i do to restore mysql base? And ldap? Is there something to do?
elenezet
Title: Re: Backup to Hard Drive
Post by: nate on January 22, 2003, 11:52:12 PM
Mr. Des,
 
I followed your how to and everything seems to work except that the .gz files are not copied to the PC share.  I get this message via email from Cron Daemon:
 
-----

SMB connection failed
17719: session setup failed: ERRDOS - ERRnoaccess (Access denied.)

flexbackup version 0.9.8
/etc/flexbackup.conf syntax OK
 
-----
 
The archive files stay in /mnt/backup
 
Do I have the syntax right in fstab:
 
//server/share  /mnt/backup  smbfs  username=myusername,password=mypassword
 
the mount command works but when I try to cp the files to the //server/share I get "//server/share" is not a directory.
 
What am I doing wrong?

 
- Nate Hartman
Title: Re: Backup to Hard Drive
Post by: Cyrus Bharda on January 23, 2003, 03:34:16 AM
Sounds like you have to take a look at the permissions set on the remote share, have you made sure that the share is read/write enabled for that user?

I just made a share on my W2k box that is read/write access for everyone, works fine :-)

Cyrus Bharda
Title: Re: Backup to Hard Drive
Post by: David Sainsbury on January 24, 2003, 04:15:27 PM
Hi, I have been trying to get my server to backup to a zip drive instead of a share. The zip is atapi version on hdc. I have followed des's howto meticulously, but it just doesn't happen. Could anyone suggest any method for troublshooting or have any advice that might help please?
Title: Re: Backup to Hard Drive
Post by: David Sainsbury on January 24, 2003, 04:16:01 PM
Hi, I have been trying to get my server to backup to a zip drive instead of a share. The zip is atapi version on hdc. I have followed des's howto meticulously, but it just doesn't happen. Could anyone suggest any method for troublshooting or have any advice that might help please?
Title: Re: Backup to Hard Drive
Post by: elenezet on February 21, 2003, 01:21:27 PM
Hello

Were can i found a script that delete backup files older than x days ?
thanks in advance.

elenezet