Move Server ( With / Without Upgrade )

 

Encryption Password:  If moving data to a new server, please be advised that it is imperative that each system is configured with the same server.conf. Therefore, it is necessary to copy the server.conf file to the new location. If the encryption password is setup differently, the new system will not be able to read the old system's volumes. 
 

This guide is designed to help you move MailArchiva to another server.  There are two aspects to consider:

 

  • Move Server - Setting up a new MailArchiva server and copying configuration, application and audit data
  • Move Volume Data - Moving volume data to a new location

 

Move Server

 

Moving servers is straight forward once you develop the understanding that each version of MailArchiva simply looks for files in specific places. Fortunately, there are no nasty migration scripts or sql dumps to run. If there are any upgrade procedures involved, these will be performed automatically on startup. Thus, in most cases, one merely needs to copy files from point A to point B (as described below).

 

The process of moving MailArchiva's configuration involves:

 

  1. Installing a fresh copy of MailArchiva on the new server (without completing the Wizard!) (Refer to Quick Setup)
  2. Stopping the new server. Stop the MailArchiva Service from Services Applet (Windows) or run /etc/init.d/mailarchiva stop (Linux)
  3. Copy the directories indicated further in the tables below from the old server to the same/equivalent locations on the new server. Refer to Step 3 below.
  4. Delete/Edit the bootstrap.conf file (if present) in the configuration path. Refer to Step 4 below.
  5. Updating volume index and store paths (if necessary). Refer to Step 5 below.
  6. Starting the new server. Start the MailArchiva Service from Services Applet (Windows) or run /etc/init.d/mailarchiva start (Linux)

If moving from V2 and upgrading to V3/V4 at the same time, some additional steps need to be taken:
 

  1. Close the existing Active volume (if applicable). In Configuration->Volumes click Close on the Active volume.  
  2. Create a new volume (so that data will be written in a new format). In Configuration->Volumes click New Volume. Enter new store and index paths. Save.
  3. Check your client connections and listeners to ensure they are all defined correctly. Verify in Configuration->Client Connections and Configuration->Listeners.
  4. Reindex all volumes. Click the Reindex All button in Configuration->Volumes.
  5. Install a new license (contact accounts if you do not have one yet!). From Configuration->About, click the Install License button.

 

Step 3. Copying Files

 

With regards to Step 3 above, using Windows Explorer or the command line, simply perform a recursive copy of the directories below to their equivalent locations on the new server. For instance, when moving from V2 to V3, to copy the main server config, you would copy C:Program FilesMailArchivaserverwebappsROOTWEB-INFconf* to C:ProgramDataMailArchivaROOTconf (Windows 7). If the new MailArchiva server resides on a different OS, copy the directories to their counterpart locations for the target operating system. 

 

MailArchiva v3.0-v7.0/v.8.0+

 

  Aspect Path To Backup MailArchiva - Windows 7 MailArchiva - Windows Server 2003 MailArchiva  - Linux
  Config Files [configuration path]

C:ProgramDataMailArchivaROOTconf
 

 

C:Documents And SettingsApplication DataMailArchivaROOTconf

/etc/opt/mailarchiva/ROOT
  Audit Logs [logging path]

C:ProgramDataMailArchivaROOTlogs*.csv

 (Windows Server 2003)

 

C:Documents And SettingsApplication DataMailArchivaROOTlogs

/var/log/mailarchiva/ROOT/audit 
  Application Data* [application data]

C:ProgramDataMailArchivaROOT 

(Windows Server 2003)

 

C:Documents And SettingsApplication DataMailArchivaROOT 

/var/opt/mailarchiva/ROOT

 

*Application Data consists of queue and database directories. Both these directories need to be copied over to the new server.

 

MailArchiva v2.0

 

Aspect Windows  
Config Files

C:Program FilesMailArchivaserverwebappsROOTWEB-INFconf* 

/usr/local/mailarchiva/server/webapps/ROOT/WEB-INF/conf/*
Audit Logs

C:Program FilesMailArchivaserverlogs*.csv 

usr/local/mailarchiva/server/webapps/ROOT/WEB-INF/logs/*.csv
License (only necesssary, if moving from V2 to V2)

C:Program FilesMailArchivaserverwebappsROOTWEB-INFclasseslicense.lic

 

/usr/local/mailarchiva/server/webapps/ROOT/WEB-INF/classes/license.lic
Application Data

n/a

n/a
 
 

Step 4. Edit/Delete Bootstrap.conf

 
When moving across platforms (for example, from Windows to Linux), in addition to the above steps, it is necessary to delete a file called bootstrap.conf before starting the server. The bootstrap.conf file is located in the Configuration Path (usually found in C:ProgramDataMailArchivaROOTconf [Windows] or /etc/opt/mailarchiva/ROOT [Linux]).
 
Alternatively, edit the contents of the bootstrap.conf file using a text editor such as notepad or vim. Manually change the location of the configuration.path, backup.path and log.path properties.
 
configuration.path=/etc/opt/mailarchiva/mailarchiva
appdata.path=/var/opt/mailarchiva/mailarchiva
view.path=%app%/temp
queue.path=%appdata%/queue
backup.path=/var/opt/mailarchiva/mailarchiva
log.path=/var/log/mailarchiva/mailarchiva
debuglog.path=%log%/debug
auditlog.path=%log%/audit
update.path=%appdata%/updates
keystore.filepath=%conf%/mailarchivacerts
themes.path=%app%/themes
database.file=%appdata%/database/archiva.db
plugins.path=%app%/plugins
log.level=info


Step 5. Updating Volume Index & Store Paths

 

When moving servers, if the volume store and index paths change, in Configuration->Volumes, unmount each volume individually and change the store and index paths to reflect the new location. Note: Active volumes will need to be closed before unmounting them. Alternatively, edit the main server configuration file (e.g. edit server.conf using wordpad or vi) with the new path locations. Refer to Move Volumes below for further details on how to move volume data.

 
 

Move Volumes

 

Encryption Password: All volume store data is encrypted. Thus, a volume cannot be moved to a MailArchiva system configured with a different encryption password. The encryption password must be the same across two different systems. If data has already been archived on the new server using a different encryption password, refer to Volume Reencrypt.

 

Using Windows Explorer or the commandline, perform a recursive copy of the contents of the volume store and index directories (listed in Configuration->Volumes ) to their corresponding target locations. MailArchiva v2.0 volumes contain a large amount of directories / files which can be difficult to handle (this is one reason why the volume store format is updated in MailArchiva v3). On Linux, when using the cp command you may receive errors such as "too many arguments". Refer to http://www.linuxjournal.com/article/6060 to correct this. On Windows, before copying data using Windows Explorer, install the freeware Teracopy program as it is particularly effective for copying large amounts of data.


On the live MailArchiva server, unmount each copied volume individually in Configuration->Volumes. When a volume is unmounted, its index and store path is editable. Enter the new volume and index store path locations, save and mount. The volume status should change to reflect the old volume status.

 

If the volume's status is incorrect, on the file system, edit a file called volumeinfo (located in the root of the volume's store path) using a text editor. Edit the status to CLOSED (all caps). if moving volume data to a remote NAS or SAN location, ensure that the MailArchiva Windows service is running an account with sufficient privileges to read/write to the location. Refer to Network Attached Storage for more information.

 

Was this information helpful?

Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.