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

DEFAULT_PARTITIONS_TO_BACKUP="1 2" produces an error #75

Closed
JoergBo opened this Issue Sep 29, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@JoergBo
Copy link

JoergBo commented Sep 29, 2018

I tried to use partition based backup, setting this parameters in raspiBackup.conf

DEFAULT_PARTITIONBASED_BACKUP="1"
DEFAULT_PARTITIONS_TO_BACKUP="1 2"

Its a Raspi 3B with Debian stretch with actual updates
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"

When i try to start i get an error

--- RBK0009I: boox-rpi3: raspiBackup.sh V0.6.4 (e93685e) um Sat 29 Sep 08:52:23 CEST 2018 gestartet.
--- RBK0128I: Logdatei ist /media/data/backup/[...]-rsync-backup-20180929-085223/boox-rpi3-backup.log.
--- RBK0116I: Konfigurationsdatei /usr/local/etc/raspiBackup.conf wird benutzt.
??? RBK0093E: Angegebene Partition 1 2 der Option -T existiert nicht.

When i do the same on the commandline -T "1 2" the backup works!
In the debug.log it seems, raspibackup detects the correct partitions, but stops with the error.
Please check, thank you.

boox-rpi3-raspiBackup.log

@framps framps self-assigned this Sep 29, 2018

@framps framps added the bug label Sep 29, 2018

@framps

This comment has been minimized.

Copy link
Owner

framps commented Sep 29, 2018

Hello @JoergBo ,

thank you very much for reporting the issue. You are right: If you use the config file to define the partitions to backup raspiBackup fails 😢 . It will work when you define them in the following way:
DEFAULT_PARTITIONS_TO_BACKUP=(1 2)
I will update the doc in the config file and mention to use parentheses to fix this issue.

The other issue you reported I cannot debug because in the log you called raspiBackup
Options: -t rsync -p /media/data/backup -v -a : -o : which fails because of the missing parentheses in the config. So either call raspiBackup again with -T "1 2" or add the parentheses in the config file and provide the log again.

@framps

This comment has been minimized.

Copy link
Owner

framps commented Sep 29, 2018

Configuration files used by installer were just updated with additional comments and the doc for the option -T was also updated right now on https://www.linux-tips-and-tricks.de/de/raspibackup#parameter

@JoergBo

This comment has been minimized.

Copy link
Author

JoergBo commented Sep 29, 2018

Hi, may be, my desciption was a little confusing. There is only one Bug.
DEFAULT_PARTITIONS_TO_BACKUP="1 2" is not working. Now i tried
DEFAULT_PARTITIONS_TO_BACKUP=(1 2) and got another bad result:

The backup starts and ends without error, but NO files are backed up!
It seems, raspBackup generates an empty rsync diff with DEFAULT_PARTITIONS_TO_BACKUP=(1 2)

--- RBK0009I: boox-rpi3: raspiBackup.sh V0.6.4 (e93685e) um Sat 29 Sep 14:23:34 CEST 2018 gestartet.
--- RBK0128I: Logdatei ist /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334/boox-rpi3-backup.log.
--- RBK0116I: Konfigurationsdatei /usr/local/etc/raspiBackup.conf wird benutzt.
--- RBK0151I: Backuppfad /media/data/backup wird benutzt.
!!! RBK0157W: Keine Services sind zu stoppen.
--- RBK0081I: Backup vom Typ rsync wird in /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334 erstellt.
--- RBK0085I: Backuperstellung vom Typ rsync gestartet. Bitte Geduld.
--- RBK0036I: Partitionslayout wird gesichert.
--- RBK0044I: Backup des Partitionlayouts wird in /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334/boox-rpi3-backup.sfdisk erstellt.
--- RBK0044I: Backup des Partitionlayouts wird in /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334/boox-rpi3-backup.blkid erstellt.
--- RBK0044I: Backup des Partitionlayouts wird in /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334/boox-rpi3-backup.parted erstellt.
--- RBK0044I: Backup des Partitionlayouts wird in /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334/boox-rpi3-backup.fdisk erstellt.
--- RBK0046I: Backup des Masterbootrecords wird in /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334/boox-rpi3-backup.mbr erstellt.
--- RBK0092I: Partition sda1 (43.5MB) wird gesichert ...
--- RBK0133I: Verzeichnis /media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-140445 wird für Hardlinks benutzt.
--- RBK0158I: rsync Backup "/media/data/backup/boox-rpi3/boox-rpi3-rsync-backup-20180929-142334" wird erstellt.
--- RBK0085I: Backuperstellung vom Typ rsync gestartet. Bitte Geduld.
sending incremental file list

sent 4,023 bytes received 15 bytes 8,076.00 bytes/sec
total size is 22,976,924 speedup is 5,690.17
--- RBK0112I: Partition sda1 wurde gesichert.
!!! RBK0156W: Keine Services sind zu starten.
--- RBK0010I: boox-rpi3: raspiBackup.sh V0.6.4 (e93685e) um Sat 29 Sep 14:23:37 CEST 2018 beendet.
--- RBK0017I: Backup erfolgreich beendet.
Reading message body from STDIN because the '-m' option was not used.
If you are manually typing in a message:

  • First line must be received within 60 seconds.
  • End manual input with a CTRL-D on its own line.

Sep 29 14:23:38 boox-rpi3 sendEmail[32260]: Message input complete.
Sep 29 14:23:38 boox-rpi3 sendEmail[32260]: Email was sent successfully!

---just info, no bugs beyond this line ---------------------------------------------------------------
If i use the commandline as a workaround, with -T "1 2" everything works perfekt! I use this for backup, with enclosed stop and start commands for apache, mysql and so on...
/usr/local/bin/raspiBackup.sh -t rsync -p /media/data/backup -v -T "1 2" -a : -o :
---just info ends :) ---------------------------------------------------------------------------------

@framps

This comment has been minimized.

Copy link
Owner

framps commented Sep 29, 2018

@JoergBo Got it now 😄 .
Looks like I have to spend more time on this issue. I frankly thought it will work with parentheses.

@framps

This comment has been minimized.

Copy link
Owner

framps commented Sep 30, 2018

@JoergBo I had to change some code and a fix ix available here. Please verify and when you closed the issue I will roll in the fix into the main branch.
Thank you very much for reporting this issue 👍

@JoergBo

This comment has been minimized.

Copy link
Author

JoergBo commented Oct 1, 2018

@framps Tested it, DEFAULT_PARTITIONS_TO_BACKUP="1 2" works now. Thank you!

@JoergBo JoergBo closed this Oct 1, 2018

@JoergBo

This comment has been minimized.

Copy link
Author

JoergBo commented Oct 1, 2018

Solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment