Knowledge Base


Knowledge Base / XFilesharing Pro / How to ...

Migrating the main server

08/20/2021 01:20 PM
Question

Answer


1.
Setup Apache, MySQL & the dependency modules on your new main server, and copy your XFileSharingPro. (The dependencies list can be found in INSTALL.txt which is coming with XFileSharingPro distribution).

2. Remove cron.pl from cronjobs on your old main server

3. Import the database on your new main server

4. Put upload maintenance on your old main server (Admin Settings -> Site Maintenance -> Upload Maintenance)

5. Add the new main server's IP into your operating system's hosts file and test that everything (except uploads) is working fine. We recommend you closing your browser and starting it again before performing such tests.

Set the field named 'allowed_ip' to an empty string in your file server's XFSConfig.pm if you're getting 'wrong main server IP' at some stage.

6. Modify the /etc/hosts record corresponding to your main server on each of your file servers in the way that it will point to your new main server's IP. On the file servers that do not have such record in /etc/hosts, add a one:

<new main server's IP> yourmainserverdomain.com www.yourmainserverdomain.com

7. Perform the previous step for your workstation operating system's hosts file, and perform some tests to ensure that everything is working fine. We recommend restarting your browser after applying any changes in hosts file to avoid caching issues.

8. Optionally reimport the database from your old main server to your new main server if there were any new data appeared, and you wouldn't loose that data

9. Switch your DNS record to your new main server
10. Put cron.pl back on your new main server