Koozali.org: home of the SME Server
Contribs.org Forums => Koozali SME Server 10.x => Topic started by: uniqsys 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.
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?
-
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:
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?
Parse error: Cannot add an absolute path
At a guess you have used the wrong path or setting somewhere.
What does this show?
config show backupwk
-
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
-
..is that what you are seeing when using "Local removable disk"
Yes I see and select SamsungT5 in the setup form.
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
-
Did you give your USB HD the label "SamsungT5" or was that already there?
Perhaps relabel using system and go again.
-
Did you give your USB HD the label "SamsungT5" or was that already there?
"no label" was the default. I entered the label "SamsungT5".
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?
-
"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?
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
-
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.
-
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:
/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.
-
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
-
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.
-
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.
-
The actual backup process is different tho..can you post the actual failure email you get?
-
Do you have any includes/excludes set? if yes please show contents of custom template..
-
Do you have any includes/excludes set? if yes please show contents of custom template..
No, None as you can see:
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
~
.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:
==================================
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.
-
Have a browse eher - http://dar.linux.free.fr/doc/man/dar.html#EXIT%20CODES
-
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
-
Specifically what/where is this?
../-rw-r--r-- 1 root root 26 Jun 26 2020 41go-into
-
I apologize for my inability to articulate.
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.
-
Regarding :
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.
-
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.
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
==================================
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!
-
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
-
You can run the backupo anytime you want from the cli
# /sbin/e-smith/do_backupwk
-
Ah, You are right. 41go-into was added by letsencrypt. The contents of the file 41go-into is:
--go-into /etc/dehydrated
So the dehydrated directory is added to the backup.
-
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
-
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.
-
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.
-
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..
-
my keyboard skills are shite :-) bout = boat
-
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 ;)
-
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
-
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.