Giter VIP home page Giter VIP logo

Comments (11)

framps avatar framps commented on July 18, 2024

Would you please provide the debug log?

from raspibackup.

DoWenzl94 avatar DoWenzl94 commented on July 18, 2024

Here it is, so there is no specific error: It gets stuck after it stops or tries to stop the services. Then, after some minutes, I cancel it with Ctrl+C.
raspiBackup.log

from raspibackup.

framps avatar framps commented on July 18, 2024

Thank you very much for the debug log. There I find

20240505-190116 DBG 3409:              --> stopServices 
20240505-190116 DBG 3416:                  --- systemctl stop apache2 && systemctl stop cron && systemctl stop mysql && systemctl stop polkit && systemctl stop snmpd && systemctl stop zabbix-agent && systemctl stop zabbix-server
20240505-190116 DBG 2601:                  --> executeShellCommand systemctl stop apache2 && systemctl stop cron && systemctl stop mysql && systemctl stop polkit && systemctl stop snmpd && systemctl stop zabbix-agent && systemctl stop zabbix-server
20240505-190409 DBG 4770:                      --> cleanup 
??? RBK0163E: Scriptausführung mit CTRL C abgebrochen.
--- RBK0033I: Bitte warten bis aufgeräumt wurde.

I can only guess. But according the debug log services are stopped and either you have to wait a bit longer (you waited 3 minutes only) or there is some service hanging and refusing to stop.

I suggest to wait some more time first. If it still hangs execute the stop commands step by step from left to right to identify the service which refuses to stop. Then you have to find out why the service doesn't stop with the stop command.

from raspibackup.

DoWenzl94 avatar DoWenzl94 commented on July 18, 2024

Okay, I have now deactivated the stopping of services for testing purposes. However, I am encountering another problem, which I've experienced before. The backup process runs smoothly without any issues, but it gets completely stuck during the cleanup process. I've attached the log. Additionally, I cannot stop it with Ctrl+C, waited more than 20min.

raspiBackup.log

from raspibackup.

framps avatar framps commented on July 18, 2024
20240505-203453 DBG 4514:          --> cleanupBackupDirectory 
20240505-203453 DBG 4516:                  *** ls -la /mnt/PiBackup/Raspi5/Raspi5-tar-backup--20240505-203413
20240505-203453 DBG 5741:                          //192.168.1.70/PiBackup on /mnt/PiBackup type cifs (rw,relatime,vers=3.0,cache=strict,username=RaspiBackup,uid=1000,noforceuid,gid=1000,noforcegid,addr=192.168.1.70,file_mode=0770,dir_mode=0770,iocharset=utf8,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,retrans=1,echo_interval=60,actimeo=1,closetimeo=1,x-systemd.automount,x-systemd.idle-timeout=30)

I unfortunately cannot see from the debug log what system provides the backup partition :-( Please tell me more details about the system which provides the backup space.

You use systemd automount. I frankly never used and tested automounted backup partitions. Please try a static mount defintiion and use the dynamic mount option of raspiBackup if you don't want to have the backup partition mounted all the time.

from raspibackup.

DoWenzl94 avatar DoWenzl94 commented on July 18, 2024

I've been experimenting a bit, and it behaves really, really weird:

I mount the drive with the following command:

//192.168.1.70/PiBackup mnt/PiBackup cifs username=xxx,password=xxx,rw,uid=1000,gid=1000,nounix,iocharset=utf8,file_mode=0770,dir_mode=0770,vers=3.0,noauto,x-systemd.automount,x-systemd.idle-timeout=30 0 0

Sometimes it works sporadically and then again not. Without making any changes, I've tried to make a backup several times now. Sometimes it works, sometimes it doesn't. The debug log always hangs at this line (attachment with _nw) when it doesn't work, but when it does work, it goes through (attachment with _w).

I absolutely can't see any regularity. For example, three times in a row, without making any changes, a backup was created. The first two times it worked without any problems, but the third time it gets stuck at that point and blocks:

matthias@Raspi5:$ sudo raspiBackup
--- RBK0009I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Sun May 5 10:44:29 PM CEST 2024 gestartet.
--- RBK0031I: Prüfe ob eine neue Version von raspiBackup.sh verfügbar ist.
--- RBK0151I: Backuppfad /mnt/PiBackup mit Partitionstyp cifs wird benutzt.
--- RBK0044I: Backup der Bootpartition wird in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224428/Raspi5-backup.img erstellt.
--- RBK0158I: tar Backup "/mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224428/Raspi5-tar-backup-20240505-224428.tar" wird erstellt.
--- RBK0085I: Backuperstellung vom Typ tar gestartet. Bitte Geduld.
tar: /var/agentx/master: socket ignored
--- RBK0078I: Backupzeit: 00:00:39.
--- RBK0033I: Bitte warten bis aufgeräumt wurde.
--- RBK0159I: 5 Backups werden für den Backuptyp tar aufbewahrt. Bitte Geduld.
--- RBK0017I: Backup erfolgreich beendet.
--- RBK0010I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Sun May 5 10:45:15 PM CEST 2024 beendet mit Returncode 0.
--- RBK0026I: Debug Logdatei wurde in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224428/raspiBackup.log gesichert.
matthias@Raspi5:
$ sudo raspiBackup
--- RBK0009I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Sun May 5 10:46:01 PM CEST 2024 gestartet.
--- RBK0151I: Backuppfad /mnt/PiBackup mit Partitionstyp cifs wird benutzt.
--- RBK0044I: Backup der Bootpartition wird in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224600/Raspi5-backup.img erstellt.
--- RBK0158I: tar Backup "/mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224600/Raspi5-tar-backup-20240505-224600.tar" wird erstellt.
--- RBK0085I: Backuperstellung vom Typ tar gestartet. Bitte Geduld.
tar: /var/agentx/master: socket ignored
--- RBK0078I: Backupzeit: 00:00:35.
--- RBK0033I: Bitte warten bis aufgeräumt wurde.
--- RBK0159I: 5 Backups werden für den Backuptyp tar aufbewahrt. Bitte Geduld.
--- RBK0017I: Backup erfolgreich beendet.
--- RBK0010I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Sun May 5 10:46:42 PM CEST 2024 beendet mit Returncode 0.
--- RBK0026I: Debug Logdatei wurde in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224600/raspiBackup.log gesichert.
matthias@Raspi5:~$ sudo raspiBackup
--- RBK0009I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Sun May 5 10:46:49 PM CEST 2024 gestartet.
--- RBK0151I: Backuppfad /mnt/PiBackup mit Partitionstyp cifs wird benutzt.
--- RBK0044I: Backup der Bootpartition wird in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224648/Raspi5-backup.img erstellt.
--- RBK0158I: tar Backup "/mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-224648/Raspi5-tar-backup-20240505-224648.tar" wird erstellt.
--- RBK0085I: Backuperstellung vom Typ tar gestartet. Bitte Geduld.
tar: /var/agentx/master: socket ignored
--- RBK0078I: Backupzeit: 00:00:36.
--- RBK0033I: Bitte warten bis aufgeräumt wurde. -> at this Point only a hard Reset by power-supply helps

raspiBackup_w.log

raspiBackup-nw.log

from raspibackup.

framps avatar framps commented on July 18, 2024

I unfortunately cannot see from the debug log what system provides the backup partition :-( Please tell me more details about the system which provides the backup space.

Please answer my question 😉 Given you have German messages I assume you're from Germany. In Germany the AVM Fritzbox is commonly used. I already got two issue because the AVM FB SMB implementation starts to hand when used ... But nobody knows why it doesn't work any more 😢

from raspibackup.

DoWenzl94 avatar DoWenzl94 commented on July 18, 2024

Hello, no, I'm from Italy, but my native language is German - but that's another story.

I'm using a Synology 923+ with the latest DSM. Everything worked smoothly with 22.04.

Now I've modified the fstab file to disable noauto and automatically mount the partition during boot. Unfortunately, it didn't succeed; it exhibits the same strange behavior. The first backup works, but when I try it again, it gets stuck during cleanup.

matthias@Raspi5:$ sudo raspiBackup
--- RBK0009I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Mon May 6 10:20:14 AM CEST 2024 gestartet.
--- RBK0031I: Prüfe ob eine neue Version von raspiBackup.sh verfügbar ist.
--- RBK0151I: Backuppfad /mnt/PiBackup mit Partitionstyp cifs wird benutzt.
--- RBK0044I: Backup der Bootpartition wird in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240506-102013/Raspi5-backup.img erstellt.
--- RBK0158I: tar Backup "/mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240506-102013/Raspi5-tar-backup-20240506-102013.tar" wird erstellt.
--- RBK0085I: Backuperstellung vom Typ tar gestartet. Bitte Geduld.
tar: /var/agentx/master: socket ignored
--- RBK0078I: Backupzeit: 00:00:39.
--- RBK0033I: Bitte warten bis aufgeräumt wurde.
--- RBK0159I: 5 Backups werden für den Backuptyp tar aufbewahrt. Bitte Geduld.
--- RBK0017I: Backup erfolgreich beendet.
--- RBK0010I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Mon May 6 10:21:01 AM CEST 2024 beendet mit Returncode 0.
--- RBK0026I: Debug Logdatei wurde in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240506-102013/raspiBackup.log gesichert.
matthias@Raspi5:
$ sudo raspiBackup
--- RBK0009I: Raspi5: raspiBackup.sh V0.6.9.1 - 2024-04-27 (536e470) Mon May 6 10:21:05 AM CEST 2024 gestartet.
--- RBK0151I: Backuppfad /mnt/PiBackup mit Partitionstyp cifs wird benutzt.
--- RBK0044I: Backup der Bootpartition wird in /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240506-102104/Raspi5-backup.img erstellt.
--- RBK0158I: tar Backup "/mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240506-102104/Raspi5-tar-backup-20240506-102104.tar" wird erstellt.
--- RBK0085I: Backuperstellung vom Typ tar gestartet. Bitte Geduld.
tar: /var/agentx/master: socket ignored
--- RBK0078I: Backupzeit: 00:00:36.
--- RBK0033I: Bitte warten bis aufgeräumt wurde. -> and now it stucks.

from raspibackup.

DoWenzl94 avatar DoWenzl94 commented on July 18, 2024

Hi, it must be an SMB/CIFS problem. I just tried mounting with NFS without any issues...

from raspibackup.

framps avatar framps commented on July 18, 2024

Hi, it must be an SMB/CIFS problem

That's what I think also. According the log the last command executed is
ls -la /mnt/PiBackup/Raspi5/Raspi5-tar-backup-20240505-222712
and for some reasons this command does not return from time to time.

I just tried mounting with NFS without any issues...

I suggest to switch to rsync backup instead of tar when you use nfs. That way you will use hardlinks and speed up the backup process 😉

If you're fine now please close the issue.

from raspibackup.

DoWenzl94 avatar DoWenzl94 commented on July 18, 2024

Thank you very much, and sorry for false alarm.

from raspibackup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.