Skip to content

Migrating a Production Server

Matt-Yorkley edited this page Aug 3, 2018 · 18 revisions

This entry is WIP.

Custom assets

The current server may have custom assets such as instance-specific logos, or PDFs with the instance's Terms and Conditions in a localised language. These are generally located under two directories: /home/openfoodnetwork/apps/openfoodnetwork/shared/system/ and /home/openfoodnetwork/apps/openfoodnetwork/shared/system/assets/.

You can use a recursive scp command to copy all files and subdirectories in each folder to the new server. The servers likely won't be able to connect to each other directly, so you can do the transfer with the -3 flag, which copies the files via a connection with your local machine (as long as you have ssh access to both servers).

Example for copying the /assets folder from the recent french server migration, where the paths and users were different:

scp -r -3 [email protected]:/home/offrance/apps/openfoodnetwork/shared/assets/ [email protected]:/home/openfoodnetwork/apps/openfoodnetwork/shared/assets/