Closed crisfd closed 4 months ago
2. ./syno_app_mover.sh: line 759: need +"50000000": syntax error: operand expected (error token is ""50000000"")
That error means the script failed to get the size of /volume1/@download. So when it got to line 759 needed=$((need +"$buffer"))
the variable "need" was empty. I should add a check if the need variable is empty.
What does the following command return?
du -s /volume1/@download | awk '{ print $1 }'
In package center does Download Station still show as installed on volume 1?
Stopping SynoCli File Tools cp: cannot stat ‘/volume3/@appstore/synocli-file/share/terminfo/n/ncr260vt300wpp’: Too many levels of symbolic links Line 338: ERROR Copying /volume1/@appstore/synocli-file to /volume3 failed! progstatus called from move_pkg_do line 587
This one is strange. DSM 6 packages do not have a share folder /volumeX/@appstore/synocli-file/share
.
DSM 6 packages only have:
/volumeX/@appstore/synocli-file/target
/volumeX/@appstore/synocli-file/var
DSM 7 packages have:
/volumeX/@appstore/synocli-file/etc
/volumeX/@appstore/synocli-file/home
/volumeX/@appstore/synocli-file/share
/volumeX/@appstore/synocli-file/target
/volumeX/@appstore/synocli-file/tmp
/volumeX/@appstore/synocli-file/var
In package center, what version of SynoCli File Tools is installed? Is it 3.3.-23 ?
By the way, with the SynoCli tools you can just uninstall them and install them on the desired volume. They have no user settings or data that needs to be moved.
What does the following command return? >>>> du -s /volume1/@download | awk '{ print $1 }'
It returns the value: 12 I dont have anything downloaded.
In package center does Download Station still show as installed on volume 1?
Yes and it didnt start. I had to remove the app, reboot and install again
By the way, with the SynoCli tools you can just uninstall them and install them on the desired volume. They have no user settings or data that needs to be moved.
Yes, but I was trying to move all apps.
Thank you.
I've fixed the "syntax error: operand expected" issue in v3.0.56 so you should be able to move Download Station now. https://github.com/007revad/Synology_app_mover/releases/tag/v3.0.56
The SynoCli File Tools issue might take a bit longer.
FYI The Download Station package is fixed, no more errors, it does not start automatically.
The installed version of SynoCli File Tools is 3.3.-23
DSM 6 packages only have: /volumeX/@appstore/synocli-file/target /volumeX/@appstore/synocli-file/var
And actually there is /volumeX/@appstore/synocli-file/bin /volumeX/@appstore/synocli-file/etc /volumeX/@appstore/synocli-file/lib /volumeX/@appstore/synocli-file/libexec /volumeX/@appstore/synocli-file/share /volumeX/@appstore/synocli-file/var
As you mentioned this app can be easily reinstalled.
When I wrote:
DSM 6 packages only have: /volumeX/@appstore/synocli-file/target /volumeX/@appstore/synocli-file/var
I was referring to symlinks in /var/packages/synocli-file
DSM 6 packages have:
/var/packages/<package-name>/target -> /volumeX/@appstore/<package-name>
/var/packages/<package-name>/var -> /volumeX/@appstore/<package-name>/var
DSM 7 packages have:
/var/packages/<package-name>/etc -> /volumeX/@appconf/<package-name>/etc
/var/packages/<package-name>/home -> /volumeX/@apphome/<package-name>/home
/var/packages/<package-name>/share -> /volumeX/@appshare/<package-name>/share
/var/packages/<package-name>/target -> /volumeX/@appstore/<package-name>/target
/var/packages/<package-name>/tmp -> /volumeX/@apptemp/<package-name>/tmp
/var/packages/<package-name>/var -> /volumeX/@appdata/<package-name>/var
So DSM 6 installs everything that is on a volume in @appstore
.
While DSM 7 has @appconf, @apphome, @appshare, @appstore, @apptemp and @appdata
.
Today I'll connect my DS213 to my DS1812+ so I can have 2 volumes and run some tests.
it does not start automatically.
Do you mean the script did not start download station? The script only starts packages that it stopped. Download Station was probably still stopped from the first time you ran the script and got an error.
I've created a 2nd volume in my DS213 on my DS1812+ and moving Syno-Cli File Tools worked.
When moving a package, cp is only used if the target folder exists and is not empty. Did you already have a /volume3/@appstore/synocli-file
folder?
I'm going to change from using cp to using rsync to avoid issues.
FYI
Did you already have a /volume3/@appstore/synocli-file folder?
I think I did tried to move manually before running the script. I ran the script again on a fresh install and it is working fine on all apps. Also, Emby Server app creates a folder Emby on the volume where it is first installed. That folder did not get moved along with app. Jellyfin does not have a folder like that Thank you.
Excellent. The changes I'm making to use rsync instead of cp will prevent that (and improve the backup and restore modes).
I'll install Emby Server and have a look.
I've had a look at Emby and it the Emby package has no extra folders that moving, So I assume you meant your video and/or music libraries.
Emby stores the library locations in a database. I had a go at writing a script to replace /volume1 with /volume3 and all I managed to do was make Emby think there were libraries configured :(
The safest way to tell Emby that your libraries have moved is:
Unfortunately Emby will reindex all of your media. (which is why I was trying to edit the database instead).
Yes, that is the folder I've mentioned and after the app is installed, it appears as a shared folder on lan browsing, but dont have access to it. In DSM it is not visible. I have tried to move the folder with mc, but it did not kept all permissions and only a reinstall of the app, it repairs it. I don't mind re-indexing library, as long as I have all collections and favorites in place. I will try the steps you mentioned.
To move a shared folder you need to use the option in Control Panel. See https://i.imgur.com/amQ0V7b.png
I'll close this thread as fixed. Thank you for your work, this script it is really helpful.
The following error occurred when trying to move Download Station
You selected Download Station in /volume1 1) /volume2 2) /volume3 Select the destination volume: 2 You selected /volume3 Ready to Move Download Station to /volume3? [y/n] y Stopping Download Station ./syno_app_mover.sh: line 759: need +"50000000": syntax error: operand expected (error token is ""50000000"") Do you want to start Download Station now? [y/n] n Finished moving Download Station Duration: 6 seconds If you want to move the DownloadStation database & temp files to /volume3
Click OK.
The following error occurred when trying to move SynoCli File Tools
You selected SynoCli File Tools in /volume1 1) /volume2 2) /volume3 Select the destination volume: 2 You selected /volume3 Ready to Move SynoCli File Tools to /volume3? [y/n] y
Stopping SynoCli File Tools cp: cannot stat ‘/volume3/@appstore/synocli-file/share/terminfo/n/ncr260vt300wpp’: Too many levels of symbolic links Line 338: ERROR Copying /volume1/@appstore/synocli-file to /volume3 failed! progstatus called from move_pkg_do line 587