Migrating to another server


Migrating to a new server

There are three components to a Web File Share installation:

The application files

The Web File Share installation folder can simply be moved or copied from one location to another, the root folder can even be safely renamed, as Web File Share doesn't reference it's own files using absolute paths.

The MySQL database

To move the MySQL database to the new server, please follow the official guide: https://dev.mysql.com/doc/refman/5.7/en/copying-databases.html

If the connection information to the new server differs from the old one, you can update it by opening the system/data/autoconfig.php file in a text editor. You can change the MySQL server hostname, username and password from inside this file.

The user files

Web File Share is referencing files by their full paths in the server's file system. If the file paths are identical on the new server, you won't need to do anything. The Web File Share installation will just work with everything in its place.

If the user files paths no longer match on the new server, you will be required to update them in the MySQL database. The following SQL queries can be ran, via either a tool such phpMyAdmin, or directly from the MySQL command line client:

UPDATE `df_modules_search_index_queue` SET `path` = REPLACE(path, '/YOUR/OLD-PATH/', '/YOUR/NEW-PATH/');
UPDATE `df_modules_search_index_queue` SET `path` = '/YOUR/NEW-PATH' WHERE `path` = '/YOUR/OLD-PATH';

UPDATE `df_paths` SET `path` = REPLACE(path, '/YOUR/OLD-PATH/', '/YOUR/NEW-PATH/');
UPDATE `df_paths` SET `path` = '/YOUR/NEW-PATH', `filename` = 'NEW-PATH' WHERE `path` = '/YOUR/OLD-PATH';

UPDATE `df_users_permissions` SET `homefolder` = REPLACE(homefolder, '/YOUR/OLD-PATH/', '/YOUR/NEW-PATH/');
UPDATE `df_users_permissions` SET `homefolder` = '/YOUR/NEW-PATH' WHERE `homefolder` = '/YOUR/OLD-PATH';

UPDATE `df_modules_user_roles` SET `homefolder` = REPLACE(homefolder, '/YOUR/OLD-PATH/', '/YOUR/NEW-PATH/');
UPDATE `df_modules_user_roles` SET `homefolder` = '/YOUR/NEW-PATH' WHERE `homefolder` = '/YOUR/OLD-PATH';

You will need to replace /YOUR/OLD-PATH, /YOUR/NEW-PATH and NEW-PATH above with your actual server file paths. You will need to respect the trailing slashes. You will be replacing /some/old/path with /some/new/path and /some/old/path/ with /some/new/path/.

Make sure you always use forward slashes (/), even on Windows servers (example: c:/your/path).

Make sure the case are used as before. If a user's home folder was previously set to /my/User, do not change to /my/user even if your new file system might be case insensitive.



Article ID: 609
Created On: Fri, Mar 7, 2014 at 3:44 AM
Last Updated On: Wed, Nov 22, 2017 at 2:38 PM
Authored by: KB Admin01 [[email protected]]

Online URL: https://kb.quikbox.com/article.php?id=609