Moving to another server¶
Moving takes three parts: copy the data to the new machine, correct the paths in config.toml, and run ./install there. The installer sets up the program around the data it finds; you do not copy the program.
Warning
Do not copy the install directory’s program files (releases/, current, nextpyp, installed.toml, install.env) and edit them by hand. Several of them hold the old machine’s paths, and ./install writes all of them correctly for the new one.
If all you need is a database-only backup, you don’t need this page. See Backup and restore.
1. Copy the data¶
Stop the website on the old machine first, so the database is quiet while it moves. Then copy these, keeping the same owner for each (the service account must exist on the new machine with the same name):
local/, which holds the databasethe shared data directory, which holds project files
config.tomlfrom the shared exec directory, into the shared exec directory on the new machineworkflows/andtemplates/from the install directory, if you changed any
The compute container does not have to be copied: the installer downloads it. To save the download, copy containers/pyp-<version>-<hash>.sif somewhere on the new machine and name it with PYP_CONTAINER_SOURCE.
2. Correct the paths in config.toml¶
On the new host, edit config.toml for every absolute path it still has: web.localDir, web.sharedDir, web.sharedExecDir, pyp.scratch, pyp.binds, slurm.templatesDir, and web.webhost. Remove a pyp.container line unless you set it on purpose. See Configuration file.
Note
web.webhost is the URL of the website as seen from a compute node, so it needs to change if the web server’s hostname does. It is not the same setting as web.host, which is the address the website binds to on the web server.
3. Install around the data¶
Download ./install of the same version the old machine ran (nextpyp version there), and run it in the new install directory, naming the folders you copied:
sudo PYP_USER=nextpyp \
PYP_LOCAL=/new/local PYP_SHARED_DATA=/new/shared PYP_SHARED_EXEC=/new/sharedExec \
./install
The installer says Using the existing configuration file and keeps it. It refuses to go on if config.toml names other folders than the ones you gave, so the website and the nextpyp command can never disagree about where the data is. It then installs the program, the systemd unit and the nextpyp command for the new paths, and starts the website on the database you copied. Upgrade afterwards, if you want a newer version, with nextpyp upgrade.
4. Check¶
nextpyp check
nextpyp doctor
nextpyp check prints the folders it resolved. Confirm they are the new ones.