Closed outdoorbits closed 3 years ago
Good question! I'll test it.
Hi,
If it works to write an id-file, I would change the backup-path like done in source-backup. Maybe the id-file should be written in DCIM-path.
We'll see, Stefan
Am 22. Juli 2021 07:32:57 MESZ schrieb Dmitri Popov @.***>:
Good question! I'll test it.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dmpop/little-backup-box/pull/97#issuecomment-884665947
-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Hmm, it doesn't work. I get the No valid source mode defined message. and I can't figure why. The iOS device and backup storage are mounted correctly.
Hi,
of course! Same in change-mode.sh. But this doesn't explain the error message. I tried yesterday and got just the message, "no iOS device...". I will check tonight and also reissue the two errors above.
Stefan
Am 22. Juli 2021 09:55:56 MESZ schrieb Dmitri Popov @.>: @. commented on this pull request.
@@ -109,6 +111,18 @@ case $CHOICE in echo @.*** sudo /home/"$USER"/little-backup-box/scripts/backup.sh camera internal > /home/"$USER"/little-backup-box.log 2>&1" } | crontab ;; +5)
- crontab -l | {
- cat
- echo @.*** sudo /home/"$USER"/little-backup-box/scripts/backup.sh ios internal > /home/"$USER"/little-backup-box.log 2>&1"
I think
backup.sh ios internal
in this line should bebackup.sh ios external
?-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dmpop/little-backup-box/pull/97#pullrequestreview-712456472
-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Hi,
if you use iOS as source and internal memory as storage, the BACKUP-_PATH would be /home/pi/BACKUP/iOS/${ID} while the MOUNT_IOS_DIR="/home/pi/iOS". I have this suggestion:
Rename MOUNT_IOS_DIR to IOS_MOUNT_POINT, that fits together with STORAGE_MOUNT_POINT and SOURCE_MOUNT_POINT. And then, why not to use IOS_MOUNT_POINT=/media/iOS?
... but this is theory, I can't test it...
Did the error-message "No valid source mode defined" happen by using default-mode after boot or by a button of the webUI? The webUI seems to work fine here, until the correct info "No iOS device Try again".
Stefan
Mit meinem angefügten öffentlichen Schlüssel "0xE61B756E.asc" können Sie gerne verschlüsselte Mails an mich senden. Näheres auch unter https://www.gpg4win.de/
Am 2021-07-22 10:24, schrieb Dmitri Popov:
@dmpop commented on this pull request.
In scripts/backup.sh [1]:
- exit 1
- fi
- fi
Create a .id random identifier file if doesn't exist
- cd "${MOUNT_IOS_DIR}"
- if [ ! -f *.id ]; then
- random=$(echo $RANDOM)
- touch $(date -d "today" +"%Y%m%d%H%M")-$random.id
- fi
- ID_FILE=$(ls -t *.id | head -n1)
- ID="${ID_FILE%.*}"
- cd
Set BACKUP_PATH
- BACKUP_PATH="${STORAGE_PATH}/iOS"
BACKUP_PATH="${STORAGE_PATH}/iOS" should probably be changed to BACKUP_PATH="${STORAGE_PATH}/iOS BACKUP", because there is already the /home/pi/iOS directory on the internal storage.
-- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [2], or unsubscribe [3].
[1] https://github.com/dmpop/little-backup-box/pull/97#discussion_r674595233 [2] https://github.com/dmpop/little-backup-box/pull/97#pullrequestreview-712480429 [3] https://github.com/notifications/unsubscribe-auth/AKY6K7JQODNT7VWIPBTDBQTTY7IU5ANCNFSM5AYWFNRA
I've spent two hours trying to figure out what causes the issue, and I couldn't find the problem. the iOS device is detected and mounted correctly, the internal/external storage is mounted correctly, but then the script stops with the No valid source mode defined message. :-(
I tried to run the backup script via the web UI and directly from the command line. Same result.
Ah, I think I've found the issue. A code block for ios
is missing in the RUN BACKUP section. There are code blocks for storage
and camera
, but not ios
.
What's that? I was sure to have changed that, my failure: Line 291 and 325 must be
if [[ " storage ios " =~ " ${SOURCE_MODE} " ]; then
Sorry!
Doesn't work either.
/home/pi/little-backup-box/scripts/backup.sh: line 291: syntax error in conditional expression
/home/pi/little-backup-box/scripts/backup.sh: line 291: syntax error near `;'
/home/pi/little-backup-box/scripts/backup.sh: line 291: `if [[ " storage ios " =~ " ${SOURCE_MODE} " ]; then'
Ah, wait: ]
is missing.
OK, looks like it works now. I pushed the fixes. Please do not merge, as I'd like to run some tests. Thank you! :-)
... was written on my mobile phone in a short break ...
Am 23. Juli 2021 16:08:37 MESZ schrieb Dmitri Popov @.***>:
Doesn't work either.
/home/pi/little-backup-box/scripts/backup.sh: line 291: syntax error in conditional expression /home/pi/little-backup-box/scripts/backup.sh: line 291: syntax error near `;' /home/pi/little-backup-box/scripts/backup.sh: line 291: `if [[ " storage ios " =~ " ${SOURCE_MODE} " ]; then'
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/dmpop/little-backup-box/pull/97#issuecomment-885665277
-- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
No worries! :-)
Because I don't own an iOS-device, the changes are not fully tested. Are there write-privileges on the iOS-device to write the random .id-file?