Koozali.org: home of the SME Server

[beta] e-smith-backup with dar

centreit

Mount/Unmount USB disk at start and finish
« Reply #30 on: November 19, 2006, 10:53:33 AM »
Could we get the backup software to mount the USB disk when the backup starts and unmount it when it is finished.

I noticed that the process goes as such:

 - Check to see if network mount is already mounted
   - If not mount network point
   - If mounted end with error
 - Run backup
 - Unmount mount point

But this only happens if it is using a smb/cifs mount point.

It is important to have this happen for usb disks as well so that the data stays intact in the case of a power failure.

Thanks,

Daniel Davis

Offline jpl

  • *
  • 112
  • +0/-0
[beta] e-smith-backup with dar
« Reply #31 on: November 22, 2006, 10:14:59 PM »
Usb disks file systems are hotplugged.

We could unmount usb disk after backup, but are you sure that it provides more security (i'm not a specialist of usb disks) ?

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
[beta] e-smith-backup with dar
« Reply #32 on: November 25, 2006, 09:05:28 PM »
Quote from: "jpl"
Usb disks file systems are hotplugged.

In practice this doesn't work well with ext3 drives. Always best to unmount so ext3 journalling terminates prior to disconnect.

Darrell

Offline p-jones

  • *
  • 594
  • +0/-0
[beta] e-smith-backup with dar
« Reply #33 on: December 01, 2006, 05:03:46 AM »
Where should I go looking to resolve this ?

Backup base file name is full-20061201
Making backup on temporary dir...
using a backup session timeout of : 88500 seconds
*** No backup allowed or error during backup ***
Dar error during backup : 4

Thanks
Peter
...

Offline jpl

  • *
  • 112
  • +0/-0
[beta] e-smith-backup with dar
« Reply #34 on: December 04, 2006, 08:41:51 PM »
The code 4 is return by the dar command.

Here is the man explanation for dar error 4 :

 4         Code issued when the user has aborted the program upon dar question from dar. This also happens when dar is not run  from a  terminal (for example launched from crontab) and dar has a question to the user. In that case, dar aborts the same way as if the user pressed the escape key at the question prompt.

A way to debug is to launch /etc/e-smith/events/actions/workstation-backup-dar from a root console. If this is really an error 4 from dar you should have some question asked to you by dar about the backup job.

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[beta] e-smith-backup with dar
« Reply #35 on: January 12, 2007, 05:08:36 AM »
jpl

You may want to do what dmay did with his contrib and put it under a diff heading etc.

After the server update I lost your ver of the dar backup out of the server manager panel and my backups stopped as well ... it was working really well till then.

I will try and re-load it on the test server and see what happens.

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[beta] e-smith-backup with dar
« Reply #36 on: January 12, 2007, 05:31:08 AM »
jpl

Re-load didn't work:

Preparing...                ########################################### [100%]
        package e-smith-backup-1.14.0-7.el4.sme (which is newer than e-smith-backup-1.14.0-06jplb01) is already installed

Can you please help with this ... I love your ver and would like to keep using it.

Regards,

Tib

Offline jpl

  • *
  • 112
  • +0/-0
[beta] e-smith-backup with dar
« Reply #37 on: January 12, 2007, 08:01:10 PM »
My answer on the bugtrack this morning :

you can wget  :


http://beta.free-eos.org/sme/RPMS/e-smith-backup-1.14.0-7jplb01.el4.sme.noarch.rpm
and
http://beta.free-eos.org/sme/SRPMS/e-smith-backup-1.14.0-7jplb01.el4.sme.src.rpm

 tell me if cleanly upgrades

Will see later to change heading

I left in beta, but no bug detected since last release.

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[beta] e-smith-backup with dar
« Reply #38 on: January 14, 2007, 10:41:01 PM »
Hello jpl

Everything seems to be fine on install.

Picked up all the prior settings so we will see I guess.

Backup will start this afternoon.

Thanks ... I love this contrib :)

Regards,

Tib

Offline twijtzes

  • **
  • 47
  • +0/-0
    • http://www.foodconsult.nl
Users gone
« Reply #39 on: January 29, 2007, 01:57:23 PM »
I'm very pleased with the DAR tool as it saved my life/server last weekend.
After reinstalling version 7.1 all data i-bays were restored in a breeze !!!

Also all users were restored, all directories exist, however a few of my users (including me) are not able to access their e-mails anymore (IMAP) neither through Horde nor through outlook express.

I don't know what i might have done wrong; all directories including maildir were restored beautifully, all "files" are still there; however after trying to connect to the account with outlook express, i get the following error:

Quote
Internal error: could not set UID/GID

Configuratie:
   Account: Taco op nieuwe server
   Server: fileserver
   Gebruikersnaam: twijtzes
   Protocol: IMAP
   Poort: 143
   Beveiligd(SSL): 0
   CODE: 800ccc0f


What is this; is it resolvable ?

Kindest regards
Taco

osiris9510

[beta] e-smith-backup with dar
« Reply #40 on: February 08, 2007, 05:20:23 PM »
SME rules...

My hat's off to Darrell May for the dar2 contrib. It worked flawlessly. I migrated to new hardware in about 2 hours and all 60gigs of data are intact.

Thank you!!!!!

Quote
I did this to upgrade my server to new hardware. These are the exact steps I used to test a server upgrade. Before using
this, try it out on test hardware. I'm still pretty much a n00b, but after *READING* and *LEARNING*, this is the method I
came up with. This method is considered a "full backup", in that it backs up e-smith's config files, passwords, groups,
users, and user data. Keep in mind that this method will NOT move your contribs over too. After restoring the server to
the new hardware, you will have to reinstall any contribs you want. This is the method that I used:


To set up an external hard drive for use with linux and ext3, see dmay's
tutorial:

http://mirror.contribs.org/smeserver//contribs/dmay/smeserver/7.x/smeserver-usb-disk-howto.htm

Quote
1. Install fresh copy of SME 7.1 on machine1.

2. Set up 4 users and copy some data > 10GB. Mess around with the users, make some disk quotas, copy some data, etc.

3. Do a yum update:

yum update
signal-event post-upgrade
signal-event reboot

4. Install dar:

wget http://mirror.contribs.org/smeserver//contribs/dmay/smeserver/7.x/dar-2.3.2-1.i386.rpm
wget http://mirror.contribs.org/smeserver//contribs/dmay/smeserver/7.x/smeserver-dar2-0.0.1-1dmay.noarch.rpm

rpm -i dar-2.3.1-1.i386.rpm
rpm -i smeserver-dar2-0.0.1-0dmay.noarch.rpm

*perl-CGI-FormMagick-0.92-08.noarch.rpm
*(probably won't need this, a newer version is already on SME 7.1)

5. Mount external USB hard drive. (I had to add an entry to /etc/fstab and reboot. Editing fstab was probably
unnecessary, but I was being impatient.)

Don't forget to mkdir to create a mount point:

mkdir /media/usbdisk
mount /dev/sda1 /media/usbdisk

6. signal-event pre-backup

This prepares mySQL data for backup.

7. Perform dar backup from your admin web console. If it screws up, you can use the web console to view the log files;
just look under "messages". When dar completes, it will automatically umount the usb drive.
If you want to verify, just:

mount /dev/sda1 /media/usbdisk
ls /media/usbdisk

Being the careful geek that I am, I made a directory called "This_Is_The_Backup_Drive" on the external drive so I know
that it is actually mounted when I do an ls on it, helpful if the drive is really empty.
You can still ls /media/usbdisk but if its not mounted, nothing will show up. When you do a backup using dar2, it will
create a directory of the backup date that contains the backup data. When the backup is done, unmount the usb drive.
(dar does an umount anyway, but if you remounted it to verify the backup went okay, don't forget to unmount it):

umount /media/usbdisk

*("sda1" may differ for your machine)

------------------------------------------------

8. Install fresh copy of SME 7.1 on machine2.

9. Do a yum update:

yum update
signal-event post-upgrade
signal-event reboot

10. Install dar2 per instructions above.

11. Mount external USB hard drive per instructions above.

12. Perform restore using dar2. *

"cd" to the directory that contains the dar files.

ex: /media/usbdisk/yoursevername.yourservername/2007.02.06

Do an ls. You should see a bunch of files that end in ".dar".

Use this command example to restore:

dar -x yyyy.mm.dd -w -R /

ex: dar -x 2007.02.06 -w -R /

*(ensure the new server has the same name and the same IP address as the old one.
you can change this later...dont forget to unplug the ehternet cable from machine1,
so IP address dont conflict... duhhh)

^^= I really don't think this matters, but I did do it just in case...careful geek.

13. signal-event reboot

14. Log in as admin and go thru the "Configure This Server" process again.

15. Test, test, test!


Notes:

*Directories to backup (dar2's default):

etc/e-smith/templates-custom
etc/e-smith/templates-user-custom
etc/group
etc/gshadow
etc/passwd
etc/samba/secrets.tdb
etc/samba/smbpasswd
etc/shadow
etc/smbpasswd
etc/ssh
etc/sudoers
home/e-smith
root

machine1:
HP D510, P4 2.0Ghz, 256MB RAM, Seagate 160GB IDE/ATA100 Hard Drive

machine2:
HP D7100, P4 2.4GHz, 512MB RAM, Seagate 160GB SATA Hard Drive

Western Digital 160 GB USB External Hard Drive Enclosure.


I hope this helps someone. I'm open to any suggestions!

Offline jpl

  • *
  • 112
  • +0/-0
[beta] e-smith-backup with dar
« Reply #41 on: February 08, 2007, 10:20:35 PM »
Quote from: "osiris9510"
SME rules...

My hat's off to Darrell May for the dar2 contrib. It worked flawlessly. I migrated to new hardware in about 2 hours and all 60gigs of data are intact.



Please post dar2 contrib comments to dar2 subject, not on this subject. Posting here dar2 comments is confusing. This subject is for e-smith-backup with dar.


JPL

Offline Tillebeck

  • ***
  • 76
  • +0/-0
[beta] e-smith-backup with dar
« Reply #42 on: February 13, 2007, 06:55:56 PM »
I have installed this contrib on a few servers. But the latest one gave some problems. I have set up the parameters to be exactly as on another server where the contrib can do the backup.

Code: [Select]
[root@ronja ~]# /etc/e-smith/events/actions/workstation-backup-dar
Error while mounting //192.168.2.22/backup :
timeout connecting to 192.168.2.22:445
timeout connecting to 192.168.2.22:139
Error connecting to 192.168.2.22 (Operation already in progress)
6314: Connection to 192.168.2.22 failed
SMB connection failed


I have checked the firewall. And the server the traffic to the 192.168.2.22 will passing.

when searching the forum for (Operation already in progress) I get three hits with no good explanations. The only post there leads to a solution is a reinstall. If noone knows anything about the error please let me know how to uninstall DAR and  this backup contrib so I can try to reinstall them.

BR. Anders

Offline Tillebeck

  • ***
  • 76
  • +0/-0
[beta] e-smith-backup with dar
« Reply #43 on: February 13, 2007, 07:10:16 PM »
Problem solved. The server I did the backup to (also a SME server) had not been configured with the extra "local network" containing the server to be backup. Therefore the error. I just did not understand the error. But all works once again :-)

BR. Anders

Offline marceld

  • 6
  • +0/-0
[beta] e-smith-backup with dar
« Reply #44 on: February 17, 2007, 06:28:12 AM »
I have 3 questions:

1 - when I start a backup (USB hdd) without de usb disk mounted the backup is made to the hdd in the server. Result: hdd full and the server will crash. Is it possible to check whether the usb disk has been mounted / check available diskspace before de actual backup is made?

2 - I had problems restoring a file with spaces in the filename. Does anyone else have this problem?

3 - I have to schedule a backup now, but a button 'Backup now' would be welcome. I do not have the usb disk installed permanently, so scheduling will not always work (with a full disk as a result).

Regards

Marcel