Migrating to a new server

There are three components to a FileRun installation:

  • The application files
  • The MySQL database
  • The user 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.

After the move, do empty the folder system/data/temp/smarty of all the temporary PHP files in there.

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.

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 SQL bellow queries can be ran, via either a tool such phpMyAdmin, or directly from the MySQL command line client.

You will need to replace YOUR-OLD-PATH, /YOUR/NEW-PATH and NEW-PATH above with your actual server file paths.

Important: 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/.

Important: You need to enclose all paths you set with single quotes. Example path inside SQL query: '/some/path'

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

Important: 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.

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-FOLDER-NAME' WHERE `path` = '/YOUR/OLD/PATH';
UPDATE `df_paths` SET depth = length(path)-length(replace(path,'/',''));
UPDATE `df_modules_shares` SET `path` = REPLACE(path, '/YOUR/OLD/PATH/', '/YOUR/NEW/PATH/');
UPDATE `df_modules_shares` SET `path` = '/YOUR/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/'), `admin_homefolder_template` = REPLACE(admin_homefolder_template, '/YOUR/OLD/PATH/', '/YOUR/NEW/PATH/');
UPDATE `df_modules_user_roles` SET `homefolder` = '/YOUR/NEW/PATH' WHERE `homefolder` = '/YOUR/OLD/PATH';