Jump to content

How to move KVS installation to another server


Tech Support

Recommended Posts

Before moving KVS please make sure that your new server complies with KVS server requirements and has all required libraries installed.

Please contact your host support to migrate all KVS files and database to a new server. KVS files should be put into TAR archive, so that they keep the same filesystem permissions. Once migrated, it is not recommended to switch DNS until you make sure that KVS installation on the new server is fully operational. In order to do this, you can locally switch your domain to a new IP (by adding local record into hosts file), access your site on the new server and check it.

There are certain directories that could be excluded from the TAR as they contain temporary files:

  • /admin/smarty/cache
  • /admin/data/engine
  • /tmp

 

Here are steps that you should do to reconfigure KVS on a new server:

Step 1. In /admin/include/setup.php update project_path option if KVS installation path was changed.

Step 2. In /admin/include/setup_db.php update database connection details.

Step 3. Try to login to admin panel by locally changing DNS to a new server. You should not have any issues with accessing admin panel at this point.

Step 4. In admin panel go to Administration -> Installation info and make sure PHP, FFmpeg and Imagemagick libraries do not display any errors:
installation_info.thumb.png.9704f140e6f5a9720a014e783e118290.png
If you see errors like "
sh: 1: /usr/bin/php: not found", edit /admin/include/setup.php and fix each path that produces error to refer valid binary path for this library.

Step 5. In admin panel go to Settings -> Storage servers and fix path for every local storage server that you have, if KVS installation path was changed.

Step 6. In admin panel go to Settings -> Conversion servers and fix path for every local conversion server that you have, if KVS installation path was changed.

Step 7. In admin panel go to Plugins -> Project backup and fix path for backup copies, if KVS installation path was changed.

Step 8. In admin panel go to Administration -> Installation info and copy Cron command. Schedule this command on crontab to run every minute.

Step 9. In admin panel go to Plugins -> System audit and run all checks except video content and album content. You can also run these checks if you want, but running them may take a lot of time if you have many videos and / or albums; therefore we recommend to run them later in a separate audit check. Make sure audit doesn't display any errors or fix any server configuration errors indicated by audit.

Step 10. Open your site and verify its basic functions.

Step 11. If you didn't manage to copy files with their permissions or you see some permission errors in KVS audit, run these command from the command line under root user within your project installation directory to fix permissions:

chmod 777 tmp
chmod 777 admin/smarty/cache
chmod 777 admin/smarty/template-c
chmod 777 admin/smarty/template-c-site

find admin/logs -type d | xargs chmod 777
find admin/logs -type f \( ! -iname ".htaccess" \) | xargs chmod 666

find contents -type d | xargs chmod 777
find contents -type f \( ! -iname ".htaccess" \) | xargs chmod 666
chmod 755 contents

find template -type d | xargs chmod 777
find template -type f \( ! -iname ".htaccess" \) | xargs chmod 666

find admin/data -type d | xargs chmod 777
chmod 755 admin/data
find admin/data -type f \( -iname "*.dat" \) | xargs chmod 666
find admin/data -type f \( -iname "*.pem" \) | xargs chmod 666
find admin/data -type f \( -iname "*.tpl" \) | xargs chmod 666

chmod 777 langs
find langs -type f \( -iname "*.lang" \) | xargs chmod 666

The end. If everything is OK at this point, you can switch public DNS to a new server. If you have audit errors / warnings that you don't understand how to fix, please contact KVS support.

Link to comment
Share on other sites

×
×
  • Create New...