Moving a Sage X3 "Folders" file system location (update 2)

7 minute read time.

In todays virtualised world, it should not be very often that you will run out of disk space for your Sage X3 file system, however it could be that you have your Sage X3 "Folders" directory stored on a disk volume that cannot be extended for some reason and need to do something to alleviate the space issue.

If you happen to be in this situation and happen to have a different disk attached to the server which has a lot more space available, then this article may be for you!

Before getting stuck in, first consider these steps if you are running out of disk space:

  • Check you are purging unneeded data, particularly the Administration functions – as these files can accumulate quickly
  • Even if using the Sage X3 purging, there are still some temporary file directories that need to be manually cleared, so check these have been recently purged
  • Check you don’t have multiple copies of exported “SVG” data.  Data exports tend to take up a lot of disk space (and they are not even very good as a backup methodology!)
  • If you have SQL Server database files located on the same disk as your Sage X3 Folders directory, it may be easier to use the SQL Server tools to relocate these files instead, as the data and index files for SQL Server are likely to be far bigger than the Sage X3 “Folders” file system
  • Rather than changing the drive, another option to consider is using the Windows operating system symbolic link command to “point” your D drive to the E drive instead.   I have had some success when using this with Sage X3 folders directory on a TEST system, but mixed results when used for other software, so will need thorough testing to confirm suitability in your situation.   You can review the Microsoft documentation at  https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink

IMPORTANT WARNING:  I have found that the X3 Console(certainly with V12 anyway) does not take into account the "volume" setting in the "configRuntime.json" and so may not be able to function if you follow these notes!

ANOTHER IMPORTANT UPDATE: With 2021 R4 (12.0.28) it seems that the "Volume" field is no longer used, so you will find that Sage can't find any folders moved as described in option 1 and 2 described below.  I would therefore suggest using mklink may be the only sensible option nowadays, for the situation covered in this article

OK, so if you’re still sure you are interested in moving your Sage X3 “Folders” directories, so let’s get stuck into the task at hand…

Backup Warning
Use caution when working with the below product functionality. Always create a backup of your data before proceeding with advanced solutions. If necessary, seek the assistance of a qualified Sage business partner, network administrator, or Sage customer support analyst.

In the scenarios shown below as examples, I have all current X3 folders stored on “D” drive and also have a new empty disk “E” which I want to use instead

1.    How can I store a new folders data onto a different disk?

My current folders data are stored in "D:\Sage\X3ERPV12\Folders" but for new folders I create from now on, I want to store the data in "E:\Sage\X3ERPV12\Folders" instead

NOTE: as per the online help ( http://online-help.sageerpx3.com/erp/12/wp-static-content/static-pages/en_US/FCT/GESADS.htm#MIS_95_20 ), this will direct just the main child folder, the data stored in X3_PUB still needs to reside in the same location as the root “X3” folder

Sage X3 has a simple method of determining where the folder data is stored… each folder has a "Volume" identified which designates where the folder data should be located.

The steps I need to take are:

1.     Create new directory on E:
e.g. "E:\Sage\X3ERPV12\Folders"
NOTE: Ensure Windows permissions are suitable from "E:\Sage" down through the structure

2.    Take a backup copy of existing configRuntime.json
Currently located in "D:\Sage\X3ERPV12\Runtime\cfg"

3.     Edit configRuntime.json
Copy the "volume": "A" and "path: "D:\\Sage\\X3ERPV12\\Folders" parts as shown below
 

Edit the copied parts to change volume to "B" and path to "E"

 Save this change

4.    Restart the Sage X3 Runtime service

5.    Login to Sage X3 as ADMIN user, connect to X3 folder

6.    Create new folder
Navigate to Parameters, General Parameters, Folders
Create new folder, in my case this is "UAT"
Ensure you manually type in "B" code for the volume setting
Complete the remaining fields for the folder as required then click "Create" button to save the changes and create the folder record
 

Click "Validation" to validate and create the UAT folder data.  Once finished you will see in the file system that the child folder is created on the E drive, although the XML files are located on the original D drive under the X3_PUB directory

 

You need to add the new folder as an endpoint as normal, then it is ready for you to use

2.    What about moving an existing folder?

Unfortunately, there is no way provided out of the box for you to move an existing directory.  In theory you could consider taking the following undocumented/unsupported steps in this case to move the SEED folder from D drive to E drive

NOTE: These steps are for illustration purposes only.  This is not a recommended nor supported process, so use at your own risk.   You certainly should not try this on a Live system without having first completed extensive testing of all business processes on a representative test system


1.    Stop the Sage X3 Syracuse, Runtime and Print Server services

2.    Manually move the SEED child folder from D to E drive in the file system

For example, move from "D:\Sage\X3ERPV12\Folders\SEED" to "E:\Sage\X3ERPV12\Folders\SEED"

3.    Make the modifications to “configRuntime.json”

Copy the “volume”: “A” and “path”: “D:\\Sage\\X3ERPV12\\Folders” parts
Edit the copied parts to change volume to “B” and path to “E” as shown below:


Save this change

4.    Manually update the X3.ADOSSIER table to change the VOLUME column from “A” to “B”, as shown below:

update X3.ADOSSIER
set VOLUME_0 = 'B'
where DOSSIER_0 = 'SEED'  -- Assuming SEED is your folder name

5.    Restart Sage X3 Syracuse, Runtime and Print Server services

6.    Test thoroughly!!      Don’t forget to test any external services you may be using, such as EDM or any customisations, to ensure these still all function correctly

3.    Can I move the whole of the “Folders” directory structure from one drive to another?

Again, there is no way provided out of the box for you to move any existing directory and there is much more complexity to moving the X3 folder in particular.  In theory you could consider taking the following undocumented/unsupported steps, in this case to move all existing folders from D drive to E drive


NOTE: These steps are for illustration purposes only.  This is not a recommended nor supported process, so use at your own risk.   You certainly should not try this on a Live system without having first completed extensive testing of all business processes on a representative test system


1.    Stop the Sage X3 AdxAdmin, Syracuse, Runtime and Print Server services and the Apache service

2.    Manually move the complete folder structure from D: to E: drive
For example, move from "D:\Sage\X3ERPV12\Folders" to "E:\Sage\X3ERPV12\Folders"

3.    Edit the "configRuntime.json" file, change the drive from D: to E: (in my example) for both the volume and the corresponding path to the folders directory, as highlighted in the screen shot below:

 

4.    Edit "..\Folders\solutions.xml"
Edit the following locations from D: to E:

application.folders.flddirmain
component.application.path

5.    Edit "D:\Sage\Safex3\AdxAdmin\inst\adxinstalls.xml"
Edit the following locations from D: to E:

application.folders.flddirmain
component.application.path

6.    Change the X3APPL.ini file
Located in "…\Folders\X3" directory
Change D: to E:

7.    Edit the .installationinformation file

NOTE : this file is a binary file, so you need to use an editor that can edit and save a binary file.  Notepad++ should allow you to do this step

Located in "..\Folders" directory
Change "D:\Sage\X3ERPV12\Folders" to "E:\Sage\X3ERPV12\Folders"

8.    Edit Sage X3 Console solutions file
Locate the solutions.xml file used by the console.  This is stored in the users directory, for example if the Sage X3 Admin user is "x3admin" the location will normally be "C:\Users\x3admin\AppData\Roaming\Sage\Console"
Change D: to E:

9.    Edit Apache  config file
Located in the Apache home conf directory  For example, "D:\Sage\FreeComponents\Apache24\conf\httpd.conf"
In the “#A_D_O_N_I_X_Solution_Alias” section, change both “Alias” and “Directory” from D to E
For example

Alias "/Adonix_X3ERPV12" "E:\Sage\X3ERPV12\Folders\X3_PUB"
<Directory "E:\Sage\X3ERPV12\Folders\X3_PUB">


10.    Start Sage X3 AdxAdmin, Syracuse, Runtime and Print Server services and the Apache service

11.    Test thoroughly!!      Don’t forget to test any external services you may be using, such as EDM or any customisations, to ensure these still all function correctly


Hopefully, the above demonstrations give you some ideas should you find yourself in an awkward situation with lack of disk space, on a drive that cannot be extended

4th Feb 2021: Additional note: My blog article "How can I move the SVG directory location" (https://www.sagecity.com/gb/sage-x3-uk/b/sage-x3-uk-support-insights/posts/how-can-i-move-the-svg-directory-location) may also be of interest to you