Migrating to another server

Migrating to a new server

There are three components to a Web File Share installation:

  • The application files
  • The MySQL database
  • The user files

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.

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
Installing updates
Viewed 1178 times since Fri, Mar 7, 2014
Upgrading PHP to version 7
Viewed 926 times since Wed, Nov 22, 2017
Upgrading to PHP 5.5 or 5.6
Viewed 1974 times since Wed, Nov 22, 2017
Deleting old files
Viewed 891 times since Wed, Nov 22, 2017
Changing the MySQL connection information
Viewed 956 times since Wed, Nov 22, 2017
Backup
Viewed 1507 times since Fri, Mar 7, 2014
Resetting the FileRun superuser password
Viewed 3047 times since Wed, Nov 22, 2017
ZGL to ionCube
Viewed 1504 times since Fri, Mar 7, 2014
Upgrading to PHP 5.4
Viewed 1499 times since Fri, Mar 7, 2014
MENU