Anchor - Migrating Data from One File Store Location to Another File Store Location
Posted by Rick Klemetson, Last modified by Anne Doring on Apr 11, 2017 12:48 PM

Overview

Anchor utilizes two separate storage mechanisms to allow for scalability and rapid-access:

  • File store—contains compressed and encrypted raw binary data. File stores can become quite large as systems scale in size.
  • Root store—made up of various SQLite databases that contain file and folder metadata. Each root type (Personal root, Team Share root, and Backup root) is assigned to its own SQLite database.

As a file store grows in size, you might need to migrate the file store to a new location. This is a procedure normally performed only by eFolder support. If you choose to perform the data migration by yourself, you understand and accept full responsibility of any and all consequences of the move.

Supported Method

The instructions listed below outline the currently support method of migrating a file store.

Note: This method requires server downtime. If you have concerns about taking your Anchor server offline for an extended period of time, please review the Maximum Uptime Method section listed below.

  1. Check permissions on the new file store location, making sure that the SYSTEM user has full permissions to the folder and all of its subfolders and files. Alternatively, if you have changed the user name under which the Anchor Server service runs, make sure this user has access to the new file store location.
  2. Stop the Anchor server service.
  3. In Windows Explorer, create and name a new folder (without spaces) on the drive to which you would like to migrate.
  4. Copy the contents from within the original File Store folder and paste into the new File Store folder. This should include a Files folder and a .store.meta file.
  5. Navigate to C:\PostGreSQL9.1\bin\pgAdmin3.
  6. Click pgAdmin3, which launches the PostGreSQL9.1 program.
  7. Within the menu bar, click the Tools menu item and select Connect Enter the password to the PostgreSQL user account.

    Note: Your PostgreSQL user password is listed in the [portal] section of your Anchor config.ini file ([target drive]:\Anchor Server\conf\config.ini).
  8. Navigate to Servers > (localhost:5432) > Databases > portal > Schemas > public > Tables.

  9. Right-click the file_store_location table and select  View Data > View Top 100 Rows.
  10. In the path column, rename the original File Store path to the new File Store path. For example, rename from original C:/OriginalFileStore to the new C:/NewFileStore.
  11. Save your changes.
  12. Start the Anchor server service.

Maximum Uptime Method

If you have concerns about taking your Anchor server offline for an extended period of time, you can use the Robocopy (Robust File Copy) command-line utility as a viable workaround.

Note: This process is currently unsupported; please proceed with caution.

Robocopy allows you to copy all file attributes and to mirror the contents of an entire folder hierarchy across local volumes or over a network. When you use robocopy, you can recover from interruptions by resuming a copy operation from the point of failure. In this way, you can incrementally migrate the bulk of your data while the Anchor server is online, and perform one final, smaller migration process when the Anchor server is offline.

Step 1: Migrate the bulk of your data while your Anchor server is online

  1. Check permissions on the new file store location, making sure that the SYSTEM user has full permissions to the folder and all of its subfolders and files. Alternatively, if you have changed the user name under which the Anchor Server service runs, make sure this user has access to the new file store location.
  1. Download and install the Robocopy utility.
  2. From the command line, run the following command, making sure to replace <source> and <target> with the appropriate paths on your server.

ROBOCOPY <Source> <Target> /MIR /Z /W:5

 This command utilizes the following parameters:

/MIR

Specifies that Robocopy should mirror the source directory and the destination directory; note that this will delete files at the destination location if they were deleted at the source location.

/Z

Ensures Robocopy can resume the transfer of a large file in mid-file instead of restarting

/W:5

Reduces the wait time between failures to 5 seconds instead of the 30 second default

  1. Rerun this command as often as needed, based on the amount of activity handled by your Anchor server.

Step 2: Migrate the remainder of the data while your Anchor server is offline

When you are satisfied that most of your data has been successfully migrated, plan a time period when you can safely and conveniently take your Anchor server offline. This process should only require minimal downtime (on average, under 1 hour).

  1. Stop the Anchor server.
  2. Rerun the Robocopy command one last time, making sure to replace <source> and <target> with the appropriate paths on your server.

ROBOCOPY <Source> <Target> /MIR /Z /W:5

  1. Navigate to C:\PostGreSQL9.1\bin\pgAdmin3.
  2. Click the PostgreSQL user, which launches the PostGreSQL9.1 program.
  1. Within the menu bar, click the Tools menu item and select Connect Enter the password to the PostgreSQL user account.

    Note: Your PostgreSQL user password is listed in the [portal] section of your Anchor config.ini file ([target drive]:\Anchor Server\conf\config.ini).
  1. Navigate to Servers > (localhost:5432) > Databases > portal > Schemas > public > Tables.

  2. Right-click the file_store_locationtable and select View Data > View Top 100 Rows.
  3. In the pathcolumn, rename the original File Store path to the new File Store path.
  4. Save your changes.
  5. Start the Anchor server.
(0 vote(s))
Helpful
Not helpful

Comments (0)