Error line 1786
Closed this issue · 9 comments
I am getting this error line 1786: package_names["${package_name}"]: bad array subscript
root@MYNAS:~# /volume1/scripts/syno_app_mover.sh
Synology_app_mover v4.0.63
DS1812+ DSM 6.2.4-25556-7
Running from: /volume1/scripts/syno_app_mover.sh
Move
Backup
Restore
Select the mode: 2
You selected Backup
Backup path is: /volume1/backups
/volume1/scripts/syno_app_mover.sh: line 1786: package_names["${package_name}"]: bad array subscript
Do you want to backup All packages? [y/n]
I've seen this issue before, 3 weeks ago, and it turned out that /var/packages still listed a package that was on a volume on a drive that had been removed. I didn't update the script to prevent this error because I didn't it would happen to other people.
If you go to "Package Center > Installed" are any packages showing as broken or need repair?
Check if any other packages are missing the INFO file:
for p in /var/packages/*; do if [[ ! -f $p/INFO ]]; then echo "Missing INFO: $p"; fi; done
Check if any packages have broken symlinks:
for p in /var/packages/*; do if [[ ! -a "$p/target" ]] ; then echo "Broken symlink:: $p"; fi; done
Try v4.0.64-RC
- Changed --list option to also show if there are any broken packages (broken 'target' symlink or missing volume).
- Bug fix for bad array subscript when a broken package exists. Issue #117
- Bug fix for packages with spaces in their name (DSM 6 Plex Media Server).
If you still get the "bad subscript" error run syno_app_mover.sh --list
to see which package is causing the problem.
- Bug fix for backing up Container Manager failing free space check.
- Changed to only start Container Manager if it's stopped, before exporting container settings.
- Changed --list option to also show if there are any broken packages (broken 'target' symlink or missing volume).
- Bug fix for bad array subscript when a broken package exists. Issue #117
- Bug fix for packages with spaces in their name (DSM 6 Plex Media Server).
Are you using ext4 on your DS1812+? I changed to btrfs on my DS1812+ many, many, years ago.
Many years ago docker on ext4 switched from aufs to overlay2. I'm amazed that Synology's Docker package in DSM 6.2.4 still uses aufs when the volume is using ext4.
I'll update the script to exclude @docker/aufs/diff/<container-id>/run
because it only contains temporary files that are recreated by docker when it starts.
Can you try this version. https://github.com/007revad/Synology_app_mover/releases/tag/v4.067
Yes I use ext4 in DS1812+ I just tried Synology_app_mover v4.067 again same error
Are sure it wasn't a different error message?
I just tried backing up Docker in DSM 6.2.4 and got the following error:
rsync: --exclude subvolumes/*/tmp/: unknown option
rsync error: syntax or usage error (code 1) at main.c(1792) [client=3.0.9]
Line 580: ERROR Backing up /volume1/@docker failed!
progstatus called from copy_dir line 1186
I've fixed this in https://github.com/007revad/Synology_app_mover/releases/tag/v4.0.68