Migrating to a new server

There are three components to a FileRun installation:

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

The application files

The FileRun installation folder can simply be moved or copied from one location to another, the root folder can even be safely renamed, as FileRun 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

The user files

FileRun 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 FileRun 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.