# 1. Introduction

The SnowMirror Drive application reduces footprint of live attachment data in a ServiceNow instance, by automatically moving it to alternative cloud storage.

The end users still access the attachments through ServiceNow, without noticing that the data is stored somewhere else.

The objective of the application is to improve ServiceNow performance and optimize storage cost.

SnowMirror product comparison

|  | Replica | Archive | Drive | Backup |
| --- | --- | --- | --- | --- |
| Use Case | Reporting based on ServiceNow data in     BI tools | Reduce footprint of obsolete data | Reduce footprint of live data | Keep a copy for data recovery |
| Typical Sync Frequency | Near real-time | Weekly/Monthly | Daily upload,           Real-time download | Daily |
| App Type | On-premises agent | On-premises agent | ServiceNow App | On-premises agent |
| Supported Storage | Database, Data lake, Cloud storage, File system | Database, Cloud storage | Cloud storage | Cloud storage |

## Archive vs Drive

|  | SM Archive | SM Drive |
| --- | --- | --- |
| Data Recency | Obsolete data | Live data |
| Data Type | Any table, including attachments | Only attachments |
| Browsing Data | Offline browser within archived storage | Through ServiceNow only, Transparent to users |
| Restoring Data | Manual | Seamless, Data is accessible from ServiceNow |
| User Impact | Medium (obsolete data not available) | None (data always accessible) |

# 2. Main Data flow

![image1.png](../assets/images/User guide/image1.png)

![image2.png](../assets/images/User guide/image2.png)

- Attachment is uploaded to ServiceNow table (e.g. Incident)
- SnowMirror Drive waits for the attachment past the time that admin wants to keep it in the instance
- SnowMirror Drive offloads attachment's data to Alternative Cloud Storage (e.g. AWS, Azure) on daily schedule and adds prefix to the attachment's names (eg. [External Storage]) for better visibility of the status.
- User accesses the attachment through a record it is attached to (eg. Incident or KB article)
- SnowMirror Drive automatically downloads attachment's data from external storage, rebuilds it and removes the prefix.

# 3. Manual Installation through Update Sets guide
Each release has 2 different version PATCH and FRESH INSTALL

### Fresh Install:
- Should be used when the application is not yet installed on the instance
- Contains all the changes for the specific version, contains all system properties, but some have empty values that needs to be filled as part of the installation
- Ensures that the application can be installed on a brand new instance, contains everything


#### Installation Steps

Go to "Retrieved Update Sets" > Click on "Import Update Set from XML" > Select the XML file that contains the version you want to upload and upload it

![image3.png](../assets/images/User guide/image3.png)

1 - Import the XML file
  - If the XML has been imported successfully, open the record with it's name that is on state "Loaded"

![image105.png](../assets/images/User guide/image105.png)

  - Click "Preview Update Set Batch"

![image107.png](../assets/images/User guide/image107.png)

  - If there are any conflicts, just click on "Accept remote update" for each

![image108.png](../assets/images/User guide/image108.png)

  - Once there are no conflicts click "Commit Update Set Batch"

![image109.png](../assets/images/User guide/image109.png)
![image110.png](../assets/images/User guide/image110.png)

2 - The fix script called `GVS_OFFLOAD Setup Application` needs to be executed as it initializes some of the parts of the application
  - Use the option "Proceed in Background" while running it
  - This script can take up to a few minutes to finish

![image111.png](../assets/images/User guide/image111.png)
![image112.png](../assets/images/User guide/image112.png)

3 - Swap to "Data offloader" scoped application, needed to edit properties in the configuration and to run the fix script without any issue

![image12.png](../assets/images/User guide/image12.png)

4 - Go to "SnowMirror Drive > Workspace > Settings"

![image45.png](../assets/images/User guide/image45.png)

5 - In the "Basic Setup" menu go through each section:

  - The first is "Delete attachment data". Check the checkbox if you want to delete them after the upload (checked by default).

![image46.png](../assets/images/User guide/image46.png)

  - Then specify how many days attachments should remain in ServiceNow (7 days by default).

![image47.png](../assets/images/User guide/image47.png)

  - In the next section define the tables you want to exclude from the upload (only entitlement_data by default). 

![image48.png](../assets/images/User guide/image48.png)

  - The last setting is to enter the SnowMirror Drive application license key. Please reach out to SnowMirror Drive support to acquire a license key.

![image49.png](../assets/images/User guide/image49.png)

6 - In the "Storage Setup" menu click on "New" and set up at least 1 Azure or AWS remote storage for the application by going through the steps. You can find detailed scenarios under [Configuration of Storages](#5-configuration-of-storages).


![image50.png](../assets/images/User guide/image50.png)

7 - (Optional) In the "Advanced Setup" menu go through the settings and change them if needed.

![image51.png](../assets/images/User guide/image51.png)

8 - Go to "SnowMirror Drive > Workspace > Attachment rules" and click "Create New Attachment Rule". You can find detailed scenarios under [Configuration of Attachment Rules](#4-configuration-of-attachment-rules).

![image52.png](../assets/images/User guide/image52.png)

9 - Fill the Name, Storage and Table fields, and add condition if needed. Click "Submit"

![image53.png](../assets/images/User guide/image53.png)

10 - Enable the Attachment Rule by the Enabled/Disabled toggle on the panel.

![image54.png](../assets/images/User guide/image54.png)

11 - Go to "SnowMirror Drive > Workspace > Home" under the "Transfer status" tab enable the automatic upload of attachments

![image55_2.png](../assets/images/User guide/image55_2.png)



### Patch Version Install

- Should be used when the application is already installed on the instance
- Contains all the changes for the specific version, but doesn't overwrite anything specific for the instance
- Only includes the 2 XML for the scoped and global applications

#### Installation Steps

Go to "Retrieved Update Sets" > Click on "Import Update Set from XML" > Select the XML file that contains the version you want to upload and upload it

![image3.png](../assets/images/User guide/image3.png)

1 - Import the Global XML file 
  - If the XML has been imported successfully, open the record with it's name that is on state "Loaded"

![image5.png](../assets/images/User guide/image5.png)

  - Preview Update Set

![image6.png](../assets/images/User guide/image6.png)

  - If there are any conflicts, just click on "Accept remote update" for each

  - Once there are no conflicts commit the update set

![image7.png](../assets/images/User guide/image7.png)


2 - Import the Scoped XML file
  - If the XML has been imported successfully, open the record with it's name that is on state "Loaded"
  - Preview the record
  - If there are any conflicts, just click on "Accept remote update" for each
  - Once there are no conflicts commit the update set

![image8.png](../assets/images/User guide/image8.png)
![image9.png](../assets/images/User guide/image9.png)

3 - (Optional) The fix script called "GVS_OFFLOAD Setup Application" can be executed as it runs some of the jobs which are responsible for refreshing the data on the Workspace

![image111.png](../assets/images/User guide/image111.png)
![image112.png](../assets/images/User guide/image112.png)

# 4. Configuration of Attachment Rules 

### Set up basic Attachment Rule

I want to set up an Attachment Rule, which uploads all attachments, which are bigger than 1MB. The attachments should be stored in AWS external storage. 

1 - Go to "SnowMirror Drive > Workspace > Settings > Attachment Rules" and click "Create New Attachment Rule".

![image82.png](../assets/images/User guide/image82.png)

2 - Give the Attachment Rule a name, define the Storage (AWS) and leave Attachment in the Table field.

![image83.png](../assets/images/User guide/image83.png)

3 - Click on "Set condition" and add: "Size bytes", "greater than or is" and 1048576 (1 MB in bytes). Click "Set".

![image84.png](../assets/images/User guide/image84.png)

4 - On the New Attachment Rule form click "Submit".

![image85.png](../assets/images/User guide/image85.png)

5 - Enable your new Attachment Rule by the toggle on the right side of the tile.

![image86.png](../assets/images/User guide/image86.png)

6 - Go back to "Home" and enable Transfer Status by the toggle.

![image87_2.png](../assets/images/User guide/image87_2.png)

7 - You can see the progress of the upload under "Transfer progress".

![image88_2.png](../assets/images/User guide/image88_2.png)

### Set up process-based, advanced Attachment Rule

I want to set up an Attachment Rule, which uploads all attachments, connected to closed Incidents. The attachments should be stored in Azure external storage. 

1 - Go to "SnowMirror Drive > Workspace > Settings > Attachment Rules" and click "Create New Attachment Rule".

![image82.png](../assets/images/User guide/image82.png)

2 - Give the Attachment Rule a name, define the Storage (Azure) and select "Incident" as Table.

![image89.png](../assets/images/User guide/image89.png)

3 - Click on "Set condition" and add: "State", "is" and "Closed". Click "Set".

![image90.png](../assets/images/User guide/image90.png)

4 - On the New Attachment Rule form click "Submit".

![image91.png](../assets/images/User guide/image91.png)

5 - Enable your new Attachment Rule by the toggle on the right side of the tile.

![image92.png](../assets/images/User guide/image92.png)

6 - Go back to "Home" and enable Transfer Status by the toggle. You can see the progress of the upload under "Transfer progress"

![image93_2.png](../assets/images/User guide/image93_2.png)

### Set up Attachment Rule based on caller's location

I want to set up two different Attachment Rules, which upload the attachments, connected to Incidents to different storages based on the caller's department. 

1 - Go to "SnowMirror Drive > Workspace > Settings > Attachment Rules" and click "Create New Attachment Rule".

![image52.png](../assets/images/User guide/image52.png)

2 - Give the Attachment Rule a Name, define the Storage (Azure) and select "Incident" as Table.

![image94.png](../assets/images/User guide/image94.png)

3 - Click on "Set condition" and first select field. Click on the small arrow next to "Caller" from the drop down list and select "Department". Finish the condition with "is" and "Customer Support". Click "Set".

![image95.png](../assets/images/User guide/image95.png) ![image96.png](../assets/images/User guide/image96.png)

4 - On the New Attachment Rule form click "Submit".

![image97.png](../assets/images/User guide/image97.png)

5 - Click "Create New Attachment Rule" again and fill the form with a Name, Storage (this time AWS!) and select "Incident" as Table. 

6 - Click on "Set condition" and set "Caller > Department", "is", "Finance" the same way, as before. Click "Set".

![image98.png](../assets/images/User guide/image98.png)

7 - On the New Attachment Rule form click "Submit".

![image99.png](../assets/images/User guide/image99.png)

8 - Enable both Attachment Rules by the toggle on the right side of the tiles.

![image100.png](../assets/images/User guide/image100.png)

9 - Go back to "Home" and enable Transfer Status by the toggle. You can see the progress of the upload under "Transfer progress"

![image93_2.png](../assets/images/User guide/image93_2.png)

### Disable and Delete Attachment Rule

I have multiple Attachment Rules enabled, but I want to disable one of them, while keeping the rest enabled, and keeping those Attachments in external storage. 

1 - If you want to disable a rule go to "SnowMirror Drive > Workspace > Settings > Attachment Rules" and click the Enable/Disable toggle for the rule you want to disable.

![image101_2.png](../assets/images/User guide/image101_2.png)

2 - If you go back to "Home" and click on "Run Mass Download Once" button you will see the progress of the download.

![image102.png](../assets/images/User guide/image102.png)

3 - If you want to remove the Attachment Rule, wait until the download finishes. 

![image103.png](../assets/images/User guide/image103.png)

4 - Go to "SnowMirror Drive > Workspace > Settings > Attachment Rules" and click on the "Delete" button of the tile, then confirm that you want to delete, by clicking "Delete" again.

![image104.png](../assets/images/User guide/image104.png)


# 5. Configuration of Storages

### Add Amazon S3 Storage

Before creating a Storage Provider record for AWS S3, you must first configure your Amazon S3 storage. See the [Amazon S3 setup in the admin guide](https://snow-mirror.com/snowmirror-drive/public/v2.0/admin_guide_2.0.html#amazon-s3-setup).

1 - Go to "SnowMirror Drive > Workspace > Settings > Storage Setup" and click "New".

![image60.png](../assets/images/User guide/image60.png)

2 - Enter "AWS" as provider and click "Next".

![image61.png](../assets/images/User guide/image61.png)

3 - Enter the credential alias name and click "Next".

![image62.png](../assets/images/User guide/image62.png)

4 - Enter Access Key ID and Secret Access Key, then click "Next".

![image63.png](../assets/images/User guide/image63.png)

5 - Enter Storage name, Service name, container and region, then click "Next".

![image64.png](../assets/images/User guide/image64.png)

6 - Click "Create Storage Record".

![image65.png](../assets/images/User guide/image65.png)

7 - The new storage appeared on the list. Connection validation is performed automatically when the record is created or updated. Check the Status field to view the result: Online or Offline.

![image66.png](../assets/images/User guide/image66.png)

8 - To manually verify the connection, select the row and click "Validate Connection."

![image67.png](../assets/images/User guide/image67.png)

### Add Azure Storage with Authentication

1 - Go to "SnowMirror Drive > Workspace > Settings > Storage Setup" and click "New".

![image60.png](../assets/images/User guide/image60.png)

2 - Enter "Azure" as provider and click "Next".

![image68.png](../assets/images/User guide/image68.png)

3 - Select "OAuth Profile" as Authentication type and click "Next"

![image69.png](../assets/images/User guide/image69.png)

4 - On the next pages ("Application Registry", "OAuth Entity Scope", "OAuth Credentials", "Connection Alias" and "Connection"), you have to enter the details for your authentication:

![image70.png](../assets/images/User guide/image70.png)
![image71.png](../assets/images/User guide/image71.png)
![image72.png](../assets/images/User guide/image72.png)
![image73.png](../assets/images/User guide/image73.png)
![image74.png](../assets/images/User guide/image74.png)

5 - On the "Storage Settings" page enter Storage name, Service name, container and region, then click "Next".

![image75.png](../assets/images/User guide/image75.png)

6 - Click "Create Storage Record".

![image76.png](../assets/images/User guide/image76.png)

The new storage appeared on the list. Connection validation is performed automatically when the record is created or updated. Check the Status field to view the result: Online or Offline.

7 - To manually verify the connection, select the row and click "Validate Connection."

![image77.png](../assets/images/User guide/image77.png)

### Remove Storage

1 - Go to "SnowMirror Drive > Workspace > Settings > Storage Setup" and click on the name of the storage you want to delete.

![image78.png](../assets/images/User guide/image78.png)

2 - In the top right corner click on the 3 dots and "Delete".

![image79.png](../assets/images/User guide/image79.png)

3 - Confirm that you want to delete by clicking "OK".

![image80.png](../assets/images/User guide/image80.png)

4 - You will be reverted to the list of storages. Refresh the page.

5 - Click "Cancel" on the Storage setting page or configure a new Storage if you want to add a new instead. 

![image81.png](../assets/images/User guide/image81.png)