Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raspiBackup log file creates rsync and tar errors because it's also saved #54

Closed
framps opened this issue Jun 4, 2018 · 17 comments
Closed
Assignees
Labels
bug Issue accepted as a bug

Comments

@framps
Copy link
Owner

framps commented Jun 4, 2018

Right now the raspiBackup log can be stored at

  1. /var/log/syslog
  2. /var/log/raspiBackup/<hostname>.log
  3. <backupPath>
  4. ./raspiBackup.log

logs 1,2 and 4 are included in the backup process and may create tar or rsync error messages (file changed during backup,(RC 23 or RC 1). Even for 3 this ist true because the log file ist stored in ~ and moved to <backuppath> when terminating.

Workaround: Use -L 3 and option -u ./raspiBackup.log

@framps framps added the bug Issue accepted as a bug label Jun 4, 2018
@framps framps self-assigned this Jun 11, 2018
@framps framps added accepted and removed accepted labels Jun 11, 2018
@framps framps removed the accepted label Jun 21, 2018
@framps
Copy link
Owner Author

framps commented Jul 1, 2018

There is a beta available which includes a fix for this issue. Feel free to grab the beta and verify the fix.

@McNose
Copy link

McNose commented Jul 5, 2018

Hi,

first of all thank you for that great program.
Unfortunately I get the RC1 error. I tried the bate version as well with no luck. The backup crashes close to the end.
The error message is: RBK0021E: Backupprogramm des Typs dd beendete sich mit RC1.

Do you have any idea?
Maybe the workaround will help, but I don´t unterstand how to use it.

Thanks a lot
McNose

@framps
Copy link
Owner Author

framps commented Jul 5, 2018

Sounds do me there is already an issue with the SD card 😢 . Please add option -l debug and start raspiBackup again. Then attach the debug log to this issue and I'll check the log..

@McNose
Copy link

McNose commented Jul 5, 2018

Thanks you for helping me.

I copied the text from the log-file into a txt. But its content is a 100% the same.

Maybe it might be important that I am using a NAS to backup the image?

Thank you.

EDIT framp: Deleted attached RaspiBackup.log for security reasons.

@framps
Copy link
Owner Author

framps commented Jul 5, 2018

In the log I found
dd: Schließen der Ausgabedatei '/backup/raspberrypi/raspberrypi-dd-backup-20180704-224457/raspberrypi-dd-backup-20180704-224457.img': Eingabe-/Ausgabefehler 20180705-002840: DBG -- Result 1
I guess there is an authorization issue and write permissions are missing on your NAS box somehow.

The command executed is
dd if=/dev/mmcblk0 bs=1MB of="/backup/raspberrypi/raspberrypi-dd-backup-20180704-224457/raspberrypi-dd-backup-20180704-224457.img"

with your NAS mounted on /backup.

Please try touch "/backup/raspberrypi/dummyFile" as root. I guess it will fail.

Make sure root has write access to the mounted backup directory.

I deleted you log because in your /etc/fstab you have hard coded your access credentials. I suggest to use the credentials option for cifs mount and place the credentials in a separate file. /etc/fstab is readable by everybody :-)

@McNose
Copy link

McNose commented Jul 6, 2018

Thank you for your advince concerning the credentials. I am not sure what to do, but I will try.

I also tried the touch "/backup/raspberrypi/dummyFile" as root. It worked. I could generate the file on my NAS.
After that I tried to backup again using the root user on the pi. Still the same error.

I will will try a backup on an USB-Stick tomorrow. But if you have any further ideas, I would be thankful.

@McNose
Copy link

McNose commented Jul 6, 2018

Maybe it help to know, that there is a backup file on my NAS. I can see it in my recycle bin.

@framps
Copy link
Owner Author

framps commented Jul 6, 2018

I guess there is something weird in following mount options.
//192.168.178.88/Backup on /backup type cifs (rw,relatime,vers=1.0,cache=strict,username=admin,domain=,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.178.88,soft,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1,_netdev)
It's a very good idea 👍 to test to create the backup on an USB disk or stick. That way you test whether my guess is right.

@McNose
Copy link

McNose commented Jul 6, 2018

Yes. Your guess is right!
It worked on an usb stick.

But what might be the problem with the mount options?
I can not understand where all the options come from you see.

I mount the device using: sudo mount -t cifs -o vers=1.0,_netdev,username=name,password=12345 //192.168.178.88/Backup /backup/

I dont know what -t cifs -o does, but it seems to be the normal way.
I added vers=1.0,_netdev, what I found somewhere in the internet, because otherwise I am always told that the host is down.

Using my command the mount seems to work. I can see the mounted files on the raspberry. But it looks like the version=1.0,_netdev might be the problem. Right?

@framps
Copy link
Owner Author

framps commented Jul 7, 2018

I frankly mount all my stuff via nfs. But you're not the first one who reported issues with mounting a samba drive on a Raspi and therefore have an issue with raspIBackup. But your issue is a samba config issue but no raspiBackup issue 😉 Samba is hard to configure. It also depends on the NAS system you use and it's configuration. 😢

I suggest to ask the community for help. Either use the German forum or the English forum. Would be great if you add the solution in this issue - assuming you find the solution

@McNose
Copy link

McNose commented Jul 7, 2018

My NAS can use nfs too.
Maybe I will give that a try.

If I find a solution I will add it here.
Thank you so far.

@framps
Copy link
Owner Author

framps commented Jul 7, 2018

nfs is faster than samba and also supports hardlinks which is very useful for rsync backups (that's what I use). There is a page about synonolgy and nfs which may help you on your nfs setup 😉

@McNose
Copy link

McNose commented Jul 7, 2018

Thank you for your help. Unfortunately the link does not help. I got the error:
mount.nfs: mount system call failed

I tried your link and these two (1, 2). Maybe you can still help here.

@framps
Copy link
Owner Author

framps commented Jul 7, 2018

I help with all issues with raspiBackup and I also help as long as it takes me a minute for other issues. Your issue is not a raspIBackup issue and I sent you links I'm aware of which may help.

Please touch base with the community now. If you decide to visit either forum mentioned above please add a link to your post her and I'll subscribe your thread and help if any raspiBackup specific information is asked for.

Please note: Everything I do is for free and I would be busy all day long if I help everybody who faces environment or configuration issues just because he tries to use raspiBackup 😉

@framps framps modified the milestone: Publish 0.6.4 Jul 21, 2018
@framps framps closed this as completed Jul 30, 2018
@framps framps reopened this Sep 25, 2018
@framps
Copy link
Owner Author

framps commented Sep 25, 2018

A user discovered with 0.6.4 the logfile is still written in /root.
#53

root@opizero:/usr/local/etc# lsof / | awk 'NR==1 || $4~/[0-9][uw]/'
COMMAND     PID       USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
dhclient   1036       root    4w   REG  179,1     6636  37408 /var/lib/dhcp/dhclient.eth0.leases
tee        1248       root    3w   REG  179,1    20086   1113 /root/opizero-raspiBackup.log
tee        1250       root    3w   REG  179,1    20086   1113 /root/opizero-raspiBackup.log

@framps
Copy link
Owner Author

framps commented Oct 2, 2018

@framps framps added fixed Issue fixed to be verified Request was accepted and implemented and waiting for requestor verification of fix labels Oct 2, 2018
@framps framps added fixed in next release and removed to be verified Request was accepted and implemented and waiting for requestor verification of fix fixed Issue fixed labels Oct 10, 2018
@framps
Copy link
Owner Author

framps commented Oct 13, 2018

Fix was merged in 0.6.4.1 beta

@framps framps closed this as completed Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue accepted as a bug
Projects
None yet
Development

No branches or pull requests

2 participants