Koozali.org: home of the SME Server

Backup error using Backup to Workstation in SME10.0

Offline uniqsys

  • *
  • 133
  • +0/-0
Backup error using Backup to Workstation in SME10.0
« on: February 07, 2022, 05:55:35 PM »
Repeatedly getting this error when I configure Workstation Backup. No backup occurs. Manual Console backup works with no problem. Tar.gz file created on USB device as expected.
USB device is Samsung SSD 1TB and is not mounted just inserted in USB 3.0. Using device/sdc1. USB device formatted as ext3.

Quote
Parse error: Cannot add an absolute path
Error while running dar: 1 at /etc/e-smith/events/actions/workstation-backup-dar line 246.
Backup terminated: backup failed - status: 65280

I have searched the forums & all and can find nothing on this error. I can't find a DAR error code list anywhere either here or on the WWW.  Any ideas on what the problem is?  Should this be raised to a bug as it references "line 246" in the code?
...

Offline ReetP

  • *
  • 3,771
  • +5/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #1 on: February 07, 2022, 07:25:58 PM »
You can help yourself by actually having a read of the code - it is trying to poiunt you in the rioght directio

If you check the file mentioned you will see this:


Code: [Select]

cat -n  /etc/e-smith/events/actions/workstation-backup-dar

....

   232 sub ldie
   233 {
   234     my $errmsg = shift;
   235     $report =~ s/Report:/Failed:/;
   236     $report .= "*** No backup allowed or error during backup ***\n";
   237     $report .= $errmsg;
   238     if (($mail eq 'yes') || ($mail eq 'error'))
   239     {
   240         sendReport ($report,$errmsg);
   241     }
   242     if (($VFSType ne 'mnt') && (!checkMount ($mntdir)))
   243     {
   244         system("/bin/umount", "-f", "$mntdir");
   245     }
   246     die($errmsg);
   247 }

......

The error so far isn't a bug. The 246 just refers to where the code stops with an error message.

More important is what does this mean?

Quote
Parse error: Cannot add an absolute path

At a guess you have used the wrong path or setting somewhere.

What does this show?

Code: [Select]
config show backupwk
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #2 on: February 07, 2022, 11:30:43 PM »
RUSB device is Samsung SSD 1TB and is not mounted just inserted in USB 3.0. Using device/sdc1. USB device formatted as ext3.

All good except for /device/sdc1, when setting up workstation backup and the USB drive is plugged in the device details/name will be seen in the setup form..is that what you are seeing when using "Local removable disk"

Below are settings from a system backuing up to a USB 2TB drive

# config show backupwk
backupwk=service
    BackupTime=0:45
    Compression=5
    CompressionProg=gzip
    DaysInSet=15
    FullDay=0
    IncNum=2
    IncOnlyTimeout=yes
    Login=
    Mount=/mnt/AAABACKUP
    Password=
    Program=dar
    SetNum=2
    SetsMax=2
    SmbHost=localhost
    SmbShare=media/AAABACKUP
    SmbV1=disabled
    Timeout=23
    VFSType=usb
    status=enabled

device name is AAABACKUP
--
qui scribit bis legit

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #3 on: February 08, 2022, 05:36:04 PM »
Quote
..is that what you are seeing when using "Local removable disk"
  Yes I see and select SamsungT5 in the setup form.

Quote
What does this code "config show backupwk" show?
  It shows the following:

 config show backupwk
backupwk=service
    BackupTime=23:11
    Compression=6
    CompressionProg=gzip
    DaysInSet=7
    FullDay=7
    IncNum=6
    IncOnlyTimeout=yes
    Login=
    Mount=/mnt/smb
    Password=
    Program=dar
    SetNum=4
    SetsMax=7
    SmbHost=localhost
    SmbShare=media/SamsungT5
    SmbV1=disabled
    Timeout=8
    VFSType=usb
    status=enabled

In looking at Terry's config, is the "Mount" reference the problem?  Mine is "/mnt/smb" whereas his is /mnt/USBdrive label?
There are no defined mount points in /mnt/smb.  There is a mount point defined in /media:  /media/SamsungT5
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #4 on: February 09, 2022, 03:20:07 AM »
Did you give your USB HD the label "SamsungT5" or was that already there?

Perhaps relabel using system and go again.
--
qui scribit bis legit

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #5 on: February 09, 2022, 04:00:37 AM »
Quote
Did you give your USB HD the label "SamsungT5" or was that already there?

"no label" was the default. I entered the label "SamsungT5".

Quote
Perhaps relabel using system and go again.

I am not sure what you mean here. I am guessing you are suggesting to re-label the usb drive and try the backup again with the different label. OK. Do you suggest that I create a mount point for it before I run the backup?  In "mnt" or "media". Or just leave it alone.
I was thinking of changing the configuration file property Mount=/mnt/smb to Mount=/mnt/SamsungT5 first and then trying it. Thoughts?
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #6 on: February 09, 2022, 07:04:56 AM »
"no label" was the default. I entered the label "SamsungT5".

So you did not create the volume label first?, nolabel would most likely have worked as the sytrem was seeing the drive as that.

If you did create a lable, how, what method?

Quote
I am not sure what you mean here. I am guessing you are suggesting to re-label the usb drive and try the backup again with the different label. OK. Do you suggest that I create a mount point for it before I run the backup?  In "mnt" or "media". Or just leave it alone.
I was thinking of changing the configuration file property Mount=/mnt/smb to Mount=/mnt/SamsungT5 first and then trying it. Thoughts?

There should be no need to create a mount point manually the system should use the volume label, once it has you will find the dir created will persist.

I would do the volume label naming first then look to setup server-manager as per those details.

Using #blkid shows the volume label on a spare USB HD I have, it is seen in server-manager as "usbstor"

# blkid
/dev/sdc1: LABEL="usbstor" UUID="e5b75a85-5f3d-4db5-9097-f0339f711ab1" SEC_TYPE="ext2" TYPE="ext3"

Added: Another method - # ls -l /dev/disk/by-label
« Last Edit: February 09, 2022, 07:19:50 AM by TerryF »
--
qui scribit bis legit

Offline ReetP

  • *
  • 3,771
  • +5/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #7 on: February 09, 2022, 10:52:54 AM »
Quote
There should be no need to create a mount point manually the system should use the volume label

Indeed. I think it has a hissy fit if you have created a mount point.

Just let it mount the drive by itself.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #8 on: February 09, 2022, 05:46:07 PM »
We may be talking at cross purposes.  Let me clarify what I did.
I purchased  the Samsung SSD which was configured for windows/mac. I deleted the partitions and made one single partition with fdisk and then formatted the disk giving the label "SamsungT5" to the device. Next I inserted it to do a console backup.  Did one without error. After it was done, I mounted the device and checked to see if the tar.gz file had really been created (why should I doubt) and it had.  I unmounted the drive, unplugged it and plugged it into a different USB port of the same type USB3.0.  I then went to Server-manager to configure workstation backup.  The device was listed as "SamsungT5" in the list. I selected that and set the other parameters starting a backup at 23:11.  Next morning I got the error listed at the beginning of the post. Repeated the server-manager backup for a few days and continued to get the error. That's when I posted for help.

Regarding the label.
# blkid returns the following:
Quote
/dev/sdc1: LABEL="SamsungT5" UUID="3e968e98-f414-47bd-af88-2b6729566ed8" TYPE="ext2"
So it looks like the label is consistent all round.
I changed the Mount property in backupwk to read /mnt/SamsungT5 just now. I will see how the backup goes tonight. That is the only inconsistency that I can see when looking at TerryF's configuration.
BTW to be safe I have done console backups to this device in the meantime.
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #9 on: February 09, 2022, 08:55:31 PM »
Aha all clear now thanks, so has to be something else, USB HD looks to not be the culprit or the setup..although in previous testing number of years ago found some external drive barnds and flash drives problamatic

Head scratching time..is a pita when you cant reproduce, good luck

--
qui scribit bis legit

Offline dallas

  • *
  • 31
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #10 on: February 10, 2022, 04:47:42 AM »
The original post stated that the drive was formatted ext3 but the output in post 8 shows TYPE="ext2".
I'm not sure this is relevant but thought I'd raise it anyway.

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #11 on: February 10, 2022, 05:50:44 AM »
Quote
The original post stated that the drive was formatted ext3 but the output in post 8 shows TYPE="ext2".
I'm not sure this is relevant but thought I'd raise it anyway.
Good point I noticed that immediately too. 

Dar backup failed again tonight with same error.  Will try removing SamsungT5 mount point in media so no directories named SamsungT5 can be found and try again tomorrow.

Since console backup works to this drive and Dar doesn't I am wondering what the difference is if they both use the same device discovery and mount approach.  Maybe they don't. I don't know the code. Just thinking.
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #12 on: February 10, 2022, 06:34:36 AM »
The actual backup process is different tho..can you post the actual failure email you get?
--
qui scribit bis legit

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #13 on: February 10, 2022, 11:15:43 AM »
Do you have any includes/excludes set? if yes please show contents of custom template..
--
qui scribit bis legit

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #14 on: February 10, 2022, 09:28:48 PM »
Quote
Do you have any includes/excludes set? if yes please show contents of custom template..
No, None as you can see:
Quote
drwxr-xr-x 2 root root 23 Jun 26  2020
 ./drwxr-xr-x 3 root root 29 Jun 26  2020
 ../-rw-r--r-- 1 root root 26 Jun 26  2020 41go-into
~

Quote
.can you post the actual failure email you get?

In addition to the error message that I put in the first post, each night I get the usual failure notice sent to me:
Quote
==================================
DAILY BACKUP TO WORKSTATION REPORT
==================================
Backup of commserver.usioffice.net started at Wed Feb  9 23:11:03 2022
==================================
Destination //localhost/media/SamsungT5/commserver.usioffice.net/set5
Basename full-20220209231103
Starting the backup with a timeout of 24 hours
*** No backup allowed or error during backup ***
Error while running dar: 1
I have no idea what dar error 1 is and have spent quite some time trying to find out in searching Koozali and the outside world.
I am going to remove the SamsungT5 directory that I created in /media so the system will have to create it on its own in tonight's backup.  It had the exact same permissions as other mount points and is owned by root.
 So to recap, there are no mount points named SamsungT5 in either /mnt or /media. Let's hope it works.
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #15 on: February 10, 2022, 10:12:33 PM »
--
qui scribit bis legit

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #16 on: February 10, 2022, 10:24:28 PM »
So backups have been working fine in the past, trying to create a new full backup as set 5

Have you changed anything from when the backup was working and when it decided to not play?

Re includes, what directory are you showing there
--
qui scribit bis legit

Offline ReetP

  • *
  • 3,771
  • +5/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #17 on: February 11, 2022, 11:15:21 AM »
Specifically what/where is this?

 ../-rw-r--r-- 1 root root 26 Jun 26  2020 41go-into
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #18 on: February 11, 2022, 06:18:00 PM »
I apologize for my inability to articulate.
Quote
Specifically what/where is this?

 ../-rw-r--r-- 1 root root 26 Jun 26  2020 41go-into
That post was meant to answer TF''s question about includes/excludes.  It is the contents of the custom-template DailyBackup.dcf used to create includes and/or excludes. I displayed it to confirm my answer that there were no includes or excludes.
...

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #19 on: February 11, 2022, 06:48:35 PM »
Regarding :
Quote
So backups have been working fine in the past, trying to create a new full backup as set 5
This issue is centered around a migration from SME 9.2 to SME 10.0. I installed SME10 on new equipment and did a restore from backup to port everything over, as instructed in the Wiki.  I used a new USB device with the new equipment and expected Dar to pick up where it left off in the backup routine.  The old usb backup device has gone on to better things and is not available anymore.

Results from last night's test where no mount points existed before the backup started are:  The SamsungT5 mount point under /media was created by the backup routine. So to my mind the routine should be able to create the path needed to continue the backup.  In this case it would be "Destination //localhost/media/SamsungT5/commserver.usioffice.net/set5".
Obviously that is not happening, so it appears to me and I may be wrong, that the system can not "pickup where it left off" on a new device.  If this is true, I think that is an issue because if your backup device failed for any reason and you needed to use a new one the system would break.

So for tonight's test I am going to create the path "/commserver.usioffice.net/set5" under the mount point "SamsungT5" and see if the backup routine sees it and writes to it.

BTW thanks TerryF for the exit code link. I guess my searches focused on "error codes" and not "exit codes" and that's why I couldn't find anything on it.  Thanks.
...

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #20 on: February 11, 2022, 07:17:50 PM »
I just had an opportunity to run the backup early to test my directory changes as mentioned in the last post.

Results are the same errors.
Quote
Parse error: Cannot add an absolute path
Error while running dar: 1 at /etc/e-smith/events/actions/workstation-backup-dar line 246.
Backup terminated: backup failed - status: 65280
Quote
==================================
DAILY BACKUP TO WORKSTATION REPORT
==================================
Backup of commserver.usioffice.net started at Fri Feb 11 13:08:03 2022
==================================
Destination //localhost/media/SamsungT5/commserver.usioffice.net/set5
Basename full-20220211130803
Starting the backup with a timeout of 24 hours
*** No backup allowed or error during backup ***
Error while running dar: 1

I am flummoxed!
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #21 on: February 11, 2022, 07:48:52 PM »
Right, so more to it than just got a new external USB HD, you do have a custom template..what is contents of

/etc/e-smith/templates-custom/etc/dar/DailyBackup.dcf/41go-into

The error message you got provides the clue - Syntax error on command-line or DCF included file

What is contents of the USB HD, does it hold the old backup sets and inc sets, does it have more importantly the catalogue file

--
qui scribit bis legit

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #22 on: February 11, 2022, 07:54:04 PM »
You can run the backupo anytime you want from the cli

# /sbin/e-smith/do_backupwk
--
qui scribit bis legit

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #23 on: February 11, 2022, 08:05:09 PM »
Ah, You are right. 41go-into was added by letsencrypt. The contents of the file 41go-into is:
Quote
--go-into /etc/dehydrated
So the dehydrated directory is added to the backup.
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #24 on: February 11, 2022, 08:41:47 PM »
Ah, You are right. 41go-into was added by letsencrypt. The contents of the file 41go-into is:So the dehydrated directory is added to the backup.

and there is the issue..see it?  --go-into /etc/dehydrated

remeber the initial error? "Parse error: Cannot add an absolute path"

Firstly remove the leading slash /  so should be --go-into etc/dehydrated and try again..it is mentioned in the wiki but is not very explicit, if you go through the actuyal dar docs elsewhere it is covered there in more detail

You didnt show what is on the USB drive in regards to backup sets and inc files, in particular the catalogue file
--
qui scribit bis legit

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #25 on: February 11, 2022, 08:52:56 PM »
Eureka!!!
The leading "/" in the 41go-into file for /etc/dehydrated was the culprit.  Removed the leading "/" and the backupwk worked without a hitch. I forgot all about that.  Obviously I am humbled and humiliated.
Thanks for all the help, I couldn't have done this alone.
I think I would like to put a note in the wiki as a caveat for others.
...

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #26 on: February 11, 2022, 08:57:26 PM »
Quote
You didnt show what is on the USB drive in regards to backup sets and inc files, in particular the catalogue file
That's because the USB drive was blank. No backups had ever been done to it, so there was no catalog.
...

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #27 on: February 11, 2022, 08:58:42 PM »
Eureka!!!
I think I would like to put a note in the wiki as a caveat for others.

No worries, we are all in the same bout :-) as I said there is a note there but it is not prominent, if you are up for it go ahead and add a more prominent warning

Re HD, I thought as much..

Enjoy and keep safe in these times..
« Last Edit: February 12, 2022, 04:40:25 AM by TerryF »
--
qui scribit bis legit

Offline TerryF

  • grumpy old man
  • *
  • 1,828
  • +6/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #28 on: February 11, 2022, 08:59:58 PM »
my keyboard skills are shite :-) bout = boat
--
qui scribit bis legit

Offline Jean-Philippe Pialasse

  • *
  • 2,807
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Backup error using Backup to Workstation in SME10.0
« Reply #29 on: February 11, 2022, 11:29:39 PM »
Ah, You are right. 41go-into was added by letsencrypt. The contents of the file 41go-into is:So the dehydrated directory is added to the backup.

I do not believe so ....
not part of smeserver-letsencrypt
you added it ;)


Offline dallas

  • *
  • 31
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #30 on: February 12, 2022, 03:37:46 AM »
and there is the issue..see it?  --go-into /etc/dehydrated

I doff my hat to you Terry! Well spotted.
I've watched this thread mature with interest and it's been an intriguing read. A learning experience in fault finding.
Learning to read log files is an essential skill.
Cheers

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Backup error using Backup to Workstation in SME10.0
« Reply #31 on: February 12, 2022, 05:44:13 AM »
Quote
I do not believe so ....
not part of smeserver-letsencrypt
you added it ;)

Quite right, quite right.  I implied the blame on the script which I didn't mean to do when really it was me following and then not following directions. i.e. I put the slash in and shouldn't have. Well we can put this one to bed. Fun and frustrating being a ferret!!  Thanks all.
...