In case you need to upgrade, update or maintain your Files Advanced server. This article will give you the basics of backing up your database and restoring it. For load-balanced configurations the process is almost entirely identical as a regular backup and restore. Any specifics will be added to the relevant steps.
Note: If your Files Advanced server database is very large, several gigabytes, you may want to use a different backup and restore method for your database. Please contact our technical support at https://support.acronis.com/mobility for help and instructions.
Note: On a Microsoft Failover Cluster, some of the paths may be different, but the backup process is the same. It should be performed on the Active node and you should make sure the role will not failover and start during the backup.
We strongly recommend you perform a test backup/restore in a test environment before proceeding with backing up/restoring your production environment.
Note: If you are load-balancing multiple Files Advanced Tomcat services, stop all of them.
Open the Files Advanced PostgreSQL Administrator tool. You can find it in Windows Start menu, under the Files Advanced folder. Connect to the database server. You may be prompted to enter the password for your postgres user.
Expand Databases and right-click on the acronisaccess_production database.
Choose Maintenance and select the Vacuum radio button and the ANALYZE checkbox. Press OK.
Expand the database, expand Schemas and expand Public. Take note of the number of the Tables section. This can help you verify that the database restore is successful after a recovery.
Close the PostgreSQL Administrator tool and open an elevated command prompt.
In the command prompt, navigate to the PostgreSQL bin directory.
Note: You will need to edit the path to point to your PostgreSQL bin folder if you use an older or a custom installation (e.g. C:\Program Files (x86)\Acronis\Access\Common\PostgreSQL\9.4\bin\).
Enter the following command: pg_dumpall --host localhost --port 5432 --username postgres --file alldbs.sql
alldbs.sql will be the filename of the backup. It will be saved in the PostgreSQL bin directory. You can use a path in the above command if you wish to save it somewhere else - e.g. change the last part of the command above like so: --file D:\Backups\alldbs.sql
If you are using a non-default port, change 5432 to the correct port number.
If you are not using the default PSQL administrative account postgres, please change postgres to the name of your administrative account in the command above.
You will be prompted to enter the postgres user'spassword several times for this process. For each prompt, enter the password and hit Enter.
Note: Typing the password will not result in any visual changes in the Command Prompt window.
Copy the backup file to a safe location.
Navigate to and copy the postgresql.conf file to a safe location, as it may contain important settings. It is located in the PostgreSQL Data folder - by default in C:\Program Files (x86)\Acronis\Files Advanced\Common\PostgreSQL\<version>\Data.
Backing up the Gateway Server database
Stop the Files Advanced Gateway service.
Go to the Gateway Server database folder, by default located at:
Copy the mobilEcho.sqlite3 file to a safe location.
If you have multiple Gateway Servers, repeat this process for each one and make sure the database files don't get mixed up.
Additional files to Backup
If you have made changes to any of these files, it is recommended to make backups so you can transfer your settings when restoring or migrating your Files Advanced product.
The postgresql.conf file as it may contain important settings relevant to your database. It is typically located in C:\Program Files (x86)\Acronis\Files Advanced\Common\PostgreSQL\<version>\Data.
web.xml located by default at C:\Program Files (x86)\Acronis\Files Advanced\Access Server\Web Application\WEB-INF\. Contains Single Sign-On settings.
server.xml located by default at C:\Program Files (x86)\Acronis\Files Advanced\Common\apache-tomcat-<version>\conf. Contains Tomcat settings.
krb5.conf located by default at C:\Program Files (x86)\Acronis\Files Advanced\Common\apache-tomcat-<version>\conf. Contains Single Sign-On settings.
login.conf located by default at C:\Program Files (x86)\Acronis\Files Advanced\Common\apache-tomcat-<version>\conf.
Your certificates and keys used for Files Advanced.
acronisaccess.cfg located by default at C:\Program Files (x86)\Acronis\Files Advanced\Access Server.
Custom color schemes located by default at C:\Program Files (x86)\Acronis\Files Advanced\Access Server\Web Application\customizations\.
pg_hba.conf located by default at C:\Program Files (x86)\Acronis\Files Advanced\Common\PostgreSQL\<version>\Data.
newrelic.yml file if you are using New Relic to monitor your Files Advanced server.
Restoring the Files Advanced database
Open the Services control panel and stop the Files Advanced Tomcat service.
Note: For load-balanced configurations, stop all Files Advanced Tomcat services.
Open the Files Advanced PostgreSQL Administrator application, connect to the local database server, select Databases, and confirm there is a database called acronisaccess_production.
Right-click on the database and select Refresh.
Expand it and expand Schemas, expand Public and verify that there are zero (0) Tables.
If there are any tables in the database, right click on the database and rename it to oldacronisaccess_production. Finally, go to Databases, right-click and create a new database called acronisaccess_production.
Close the PostgreSQL Administrator and open an elevated command prompt.
In the command prompt, navigate to the PostgreSQL bin directory.
Copy the database backup file alldbs.sql (or whatever you have named it) into the bin directory.
In the command prompt, enter the following command: psql -U postgres -f alldbs.sql
Enter your postgres password when prompted for it.
Note: Depending on the size of your database, the restore can take some time.
After the restore is complete, close the command prompt window.
Open the Files Advanced PostgreSQL Administrator application again and connect to the local database server.
Select Databases.
Expand the acronisaccess_production database, expand Schemas and expand Public. Verify that the number of Tables is the same as it was in step 5 of the "Backup the Files Advanced's database" section.
Note: If the Files Advanced Server version you restore the database to is newer than the version from your database backup, and the Files Advanced Tomcat service has already been started, the number of tables in the new Files Advanced Server database could be larger than the number of tables you had when you did the backup.
Restoring the Gateway Server database
Stop the Files Advanced Gateway service.
Copy the mobliEcho.sqlite3 Gateway Server database backup into the new Gateway Server's database folder (by default C:\Program Files (x86)\Acronis\Files Advanced\Gateway Server\database) replacing the existing file.
Repeat this process for all Gateway Servers.
Restoring additional files and customizations
Make sure to copy any customizations made to Files Advanced' configuration files (web.xml, server.xml, krb5.conf, certificates, custom color schemes, email templates, pg_hba.conf or newrelic.yml), and move them to the new files.
Testing your restored Files Advanced Server
After you have successfully performed a backup/restore or a migration to another machine, it's time to bring Files Advanced back online and to verify that all settings are correct.
Bringing regular deployments online
Start the Files Advanced Configuration Utility and make sure all settings found there are correct.
Press OK to start all services.
This should bring all services online simultaneously and restore all Files Advanced functionality.
If any of the components are on a separate machine, make sure to go to that machine and start them as well. In this case, the PostgreSQL service must be running in order for the Files Advanced Tomcat service to start without errors.
Bringing load-balanced deployments online
Pick one of your Files Advanced Servers to act as a Primary. It will be the Primary only in the sense that it will be brought online first.
If the PostgreSQL service is on another machine, make sure to start it first as it will affect the Files Advanced Server.
Go to the machine for the Primary Files Advanced Server and start the Files Advanced Configuration Utility.
Make sure all settings found there are correct. If there are no issues, press OK to start all services.
Open the Files Advanced web console and login as an administrator. Verify that all settings are correct.
Once you have verified your settings, proceed to go over each machine that has a Files Advanced component and starting it via the Configuration Utility.