This manual is intended for operators of a local instance (installation) of SoSci Survey. The manual describes how to move an installation of SoSci Survey with all survey projects from one server to another server.
Note: This is not about moving a single survey project, for this see Copying or Moving a Survey Project
An instance of SoSci Survey consists of the following components:
To move to another server, proceed as follows.
test.html with any content in the root directory for SoSci Survey, and test whether this file can be accessed in the browser via HTTPS using the new URL with the suffix /test.html (for example https://www.example-new-server.com/test.html)sendmail), this should be configured correctly as well. Sending via SMTP is usually easier to maintain.transfer in the example) facilitates the transfer of the files.rsync and scp, alternatively pack it as .tar.gz and copy this file via SFTP.rsync only copies the changed data.rsync for a specifically created Linux user transferscpadmin/install.php into the new installation directory of SoSci Survey, into the subdirectory admin/ (this file was deleted automatically after the last update)./admin/install.php (for example https://www.example-new-server.com/admin/install.php).$GLOBALS['oFb']['licence data'] = … from the file system/config.php.admin/install.php) has completed successfully, the maintenance mode (Locking Server) is ended automatically.Please note that the following code is only an example. For use on your own server, both the paths and the names of users and/or groups must be adjusted.
# Temporarily adjust the permissions for protected directories # (on the old server) sudo chmod -R 750 /var/www/soscisurvey/files/protected sudo chmod -R 750 /var/www/soscisurvey/system/keyring # Synchronize the file system without cache and sessions # (on the new server) sudo rsync -av -e ssh --delete --exclude=/system/session/ --exclude=/system/cache/ --exclude=/view transfer@192.0.2.123:/var/www/soscisurvey/ /var/www/soscisurvey/ sudo rsync -av -e ssh --delete transfer@192.0.2.123:/var/www/sosci-log/ /var/www/sosci-log/ # Create the database dump # (on the old server) sudo mysqldump -usosci -p --databases soscisurvey --quick --single-transaction | gzip -9 > /home/transfer/transfer-database.sql.gz # Copy the dump to the new server and import it # (on the new server) scp -i ~/.ssh/id_ecdsa transfer@192.0.2.123:/home/transfer/transfer* /home/transfer gunzip -c /home/transfer/transfer-database.sql.gz | mysql -u sosci -p soscisurvey # The project directories must be owned by www-data, so that PHP can write there # (on the new server) sudo chown -R www-data:www-data /var/www/soscisurvey # Some directories are assigned exclusively to www-data # (on the new server) sudo chown -R www-data:www-data /var/www/soscisurvey/system/keyring sudo chown -R www-data:www-data /var/www/soscisurvey/files sudo chown -R www-data:www-data /var/www/soscisurvey/system # FTP is the owner of the libraries, but the entire www-data group has read access # (on the new server) sudo chown -R www-ftp:www-data /var/www/soscisurvey/admin sudo chown -R www-ftp:www-data /var/www/soscisurvey/inc sudo chown -R www-ftp:www-data /var/www/soscisurvey/lib sudo chown -R www-ftp:www-data /var/www/soscisurvey/images sudo chown -R www-ftp:www-data /var/www/soscisurvey/internal sudo chown -R www-ftp:www-data /var/www/soscisurvey/layout sudo chown -R www-ftp:www-data /var/www/soscisurvey/modules sudo chown -R www-ftp:www-data /var/www/soscisurvey/plugins sudo chown -R www-ftp:www-data /var/www/soscisurvey/script sudo chown -R www-ftp:www-data /var/www/soscisurvey/templates # Set the permissions again # (on the new server) sudo chmod -R u-x+rwX,g-xw+rX,o-rwx /var/www/soscisurvey sudo chmod 770 /var/www/soscisurvey sudo chmod -R u-x+rwX,go-rwx /var/www/soscisurvey/files/protected sudo chmod -R u-x+rwX,go-rwx /var/www/soscisurvey/system/keyring