Koozali.org: home of the SME Server

having problems getting DAR to do a backup

Offline wdepot

  • ****
  • 101
  • +0/-0
    • http://westerndepot.com
having problems getting DAR to do a backup
« on: October 14, 2007, 12:32:06 AM »
About a month ago we had to replace the hard drives in our SME Server simply because they had gotten old and worn out. I ended up doing a reinstall of SME 7.2 and the few contributions that we use. My problem is that since the reinstall I can't seem to get DAR to do a backup to our NAS, automatic or manual. I've double checked to be sure that the NAS and the server both use the same workgroup name. I've double checked the user name and password given to DAR and made sure that the user has read/write priviledges on the NAS. I've checked the cron logs and it does seem to be faithfully activating DAR every day at the set time. However, I used to get an email from DAR each time it ran but I haven't received anything since the reinstall and there are no backup files on the NAS dated since the reinstall of SME Server. The main settings for DAR are as follows:

Target: //backupdrive/backup
File System: smbfs
Slice Size: 650
Compression: 0
Expiry: 7
Backup Day: *

I've already tried using an IP setting with cifs (//10.0.3.204/backup) and that didn't make any difference, still no backup. Can anyone tell me what might be going wrong and, more importantly, how to fix it?

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: having problems getting DAR to do a backup
« Reply #1 on: October 14, 2007, 07:02:23 PM »
what happens if you try to 'mount' the backup drive manually from the command prompt using

mkdir -p /mnt/backup
mount -t cifs -o user=username //backupdrive/backup /mnt/backup


(or mount -t cifs -o user=username //w.x.y.z/backup /mnt/backup)

You should be prompted for a password, then you should be able to see the contents of the backup share in the (previously empty) folder you mounted it on...


Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: having problems getting DAR to do a backup
« Reply #2 on: October 15, 2007, 11:50:34 PM »
Run the job from the command line and watch the results:

/etc/e-smith/events/actions/dar2-backup jobname

Offline wdepot

  • ****
  • 101
  • +0/-0
    • http://westerndepot.com
Re: having problems getting DAR to do a backup
« Reply #3 on: October 17, 2007, 08:49:55 PM »
To mmccarn:

When I tried mounting with smbfs and //backupdrive I got the following error message after I entered the password (which I did double check as being correct):

31133: tree connect failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)

When I tried connecting using the IP address and cifs I was able to view the contents of the drive without any problem. I've therefore modified the backup job to use the IP address with cifs. However, I am still not getting any backup.

To dmay:

Since the job name for my backup is Full Backup I tried the following two commands:

/etc/e-smith/events/actions/dar2-backup "Full Backup"
/etc/e-smith/events/actions/dar2-backup 'Full Backup'

In both instances I was immediately returned to the command line with no other output. I did an ls -l of the /etc/e-smith/events/actions/ directory to see what was there and did find a listing for dar2-backup. The properties as given were -r-xr-xr--  1 root root 3448 Mar 22 2007.

Since I thought perhaps having a space in the job name could be a problem I created a new full backup job with the job name of complete using the IP address for the NAS and cifs. I then tried the following command:

/etc/e-smith/events/actions/dar2-backup complete

This item I got some output as follows:

Connecting /mnt/dar2/complete to //10.0.3.204/backup
Expanding /etc/dar2/complete template
Creating /mnt/dar2/complete/www.westerndepot.com/complete/db.zip
zip I/O error: Permission denied

zip error: Could not create output file(/mnt/dar2/complete/www.westerndepot.com/complete/db.zip)
Expiring old backups
Executing pre-backup event
Verbose logging is off
Performing complete backup
Error while saving data: Error opening file /mnt/dar2/complete/www.westerndepot.com/complete/2007.10.17.1.dar : Permission denied

I've double checked permission for the user I'm using for backups and the NAS says this user has read/write permission for the backup directory so I'm not sure what could be going on. Dar did not email that there was a problem like it used to either. Does either of you have any further ideas?

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: having problems getting DAR to do a backup
« Reply #4 on: October 18, 2007, 12:00:45 AM »
Read the dar server-manager panel. You will see it states:

Enter a unique backup job name. The name should contain only letters, numbers, periods, hyphens and underscores. No spaces.

You have a permissions problem. Did you keep any backups when things were working fine. Look in your old backups for the correct db entries. They will be stored in /home/e-smith/db/dar2. You must have something wrongly entered.

Offline wdepot

  • ****
  • 101
  • +0/-0
    • http://westerndepot.com
Re: having problems getting DAR to do a backup
« Reply #5 on: October 18, 2007, 01:17:44 AM »
I wondered about the job name when I didn't get any response to the "Full Backup" when I tried the manual backup as you suggested. That's why I created a new job with a single word name. The backup still doesn't run even with the name change. The last backup files that we successfully created are still on the NAS but how do I read it?

Current settings are as follows:

Job Name: complete
Description: full backup of Western Depot server
Backup Selections: default set that DAR entered
Prune Directories and Exclude Files are both empty
Target: //10.0.3.204/backup
File System: cifs
Slice Size: 650
Compression: 3
Expiry: 7
Verbose: Off
Backup Day: *
Backup Time: 12:00
User Name & Password have been double and triple checked to be sure they are the same as what is set on the NAS and the NAS shows that the user has read/write priviledges on the /backup directory.

The cron log shows that DAR was activated at the proper time and the NAS now contains a folder in the backup directory named complete but that folder is empty. I got an email from the Cron Daemon that reads:

Creating /mnt/dar2/complete dir
/bin/mkdir: cannot create directory `/mnt/dar2/complete': File exists

Any further suggestions would be appreciated.

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: having problems getting DAR to do a backup
« Reply #6 on: October 18, 2007, 06:58:52 PM »

Offline wdepot

  • ****
  • 101
  • +0/-0
    • http://westerndepot.com
Re: having problems getting DAR to do a backup
« Reply #7 on: October 18, 2007, 09:47:59 PM »
Well, I don't what difference it made but I tried naming a new backup set with the same job name as the one before the hard drive swap and now everything is working properly. I don't know why a new job name wouldn't work when all of the other settings were the same but as long as the backup works that is all that matters.