Friday, October 31, 2014

How to move Surveillance Station installation from one volume to the other in DSM 5.0

Suppose you would want to move all contents of a volume in a Synology NAS to another volume, because you are swapping disks or for other reasons.

You should first move all shared folders to the other volume (which is not described here). This can be done through the GUI.
However suppose you installed a package in the volume you would want to remove, there is nothing in the GUI that let you move this package to another volume.

To be able to do that login in to the shell, which is possible through ssh (once you enabled it in the GUI).
The following example is for the Surveillance Station application, which we will move from volume2 to volume1.

  1.  Take a backup of all your precious data
  2. Login to the terminal as root
  3. Stop Surveillance station:  "/var/packages/SurveillanceStation/scripts/start-stop-status stop"
  4. Move the package:  "mv /volume2/@appstore/SurveillanceStation/ /volume1/@appstore/"
  5. Remove the system symlink: rm -fv /var/packages/SurveillanceStation/target
  6. Point the system symlink to the new location:  "ln -s /volume1/@appstore/SurveillanceStation /var/packages/SurveillanceStation/target"
  7. Start Surveillance Station: "/var/packages/SurveillanceStation/scripts/start-stop-status start"