Back up and restore the entire Redis database of a node, which includes Node API users, their access keys, and transfer history. If your transfer server is an IBM Aspera on Cloud (AoC) node, migrate AoC data from one node to another by backing up the Redis database on the primary node and restoring the database on a new node.
Before you begin
- Verify that you have administrative or root access on both nodes.
- Ensure that both nodes run the same version of Aspera® software. Run ascp -A to check the version.
- If you are migrating between nodes, ensure network connectivity between the primary node and the new node.
- Verify that Curl is installed for verification steps. If Curl is not installed, download it from https://curl.haxx.se/download.html.
Tip: These instructions assume that the node uses the default Redis port 31415. If your deployment uses a different port, substitute it in all commands.
Procedure
-
[Primary node] Stop the the Aspera Node Service service.
Attention: You are working on the primary node. Stopping this service interrupts active transfers.
-
[Primary node] Create the Redis database backup.
This command initiates a background rewrite of the append-only file (AOF), which is the Redis persistence mechanism.
> asredis -p 31415 BGREWRITEAOF
Tip: The command returns immediately. The backup process runs in the background and typically completes within 1 - 2 minutes.
-
[Primary node] Verify that the backup files were created successfully.
The backup creates an appendonlydir directory that contains the following files:
- appendonly.aof.1.base.aof - The main database backup file
- appendonly.aof.manifest - Metadata about the backup
The backup directory is located in the following path:
C:\Program Files\Aspera\Enterprise Server\var\appendonlydir
To verify that the files exist and check their size, run the following command:
dir "C:\Program Files\Aspera\Enterprise Server\var\appendonlydir"
Tip: The .aof file size must be greater than 0 bytes. If the file is 0 bytes or missing, the backup failed.
-
[Primary node] Copy the backup files to a secure location.
Copy the entire appendonlydir directory and its contents to the following locations:
- A secure backup location for disaster recovery
- The new node (if you are migrating) at the same directory path that is shown in the previous step
Attention: When you migrate to a new node, you must place the backup files in the exact same directory structure on the new node before you proceed.
Tip: For redundancy, store an additional copy on a separate machine or backup system.
-
[New node] Stop the the Aspera Node Service service.
Attention: You are now working on the new node. Ensure that you copied the backup files to this node before you proceed.
Complete the following steps:
-
[New node] Clear all existing data from the Redis database.
DANGER: This command permanently deletes all existing data in the Redis database on the new node. Ensure that you have backups if needed.
> asredis -p 31415 FLUSHALL
The command returns OK.
-
[New node] Load the backup database into the new node.
Navigate to the directory that contains the backup files, then run the following command:
> type appendonlydir\appendonly.aof.1.base.aof | asredis --pipe -p 31415
The command returns output similar to the following example:
All data transferred. Waiting for the last reply...
Last reply received from server.
errors: 0, replies: number
Tip: If the output shows errors: 0, the restore was successful. Any non-zero error count indicates a problem.
-
[Both nodes] Restart the the Aspera Node Service service on both the primary node and the new node.
Primary node
Complete the following steps:
New node
Tip: Wait 10 - 15 seconds after you start the service before you proceed to verification.
-
[AoC only] If you use AoC, update the node hostname.
- Log in to AoC.
- Go to the Admin app > Nodes and storage.
- Verify that the hostname matches the DNS entry for the new node. Update the hostname if necessary.
-
[Both nodes] Verify that the database restoration succeeded.
Run the following command on both the primary node and the new node to retrieve access keys:
curl -ki -u node_username:node_password http[s]://hostname:http_port/access_keys
Replace the following placeholders with your values:
- node_username - Your Node API username
- node_password - Your Node API password
- hostname - The node hostname or IP address
- http_port - The Node API HTTP port (typically 9092)
If the restoration succeeded, the following conditions are true:
- Both commands return HTTP 200 OK status.
- The JSON response contains the same access keys on both nodes.
- The number of access keys matches between nodes.
Example of successful output:
{
"access_keys": [
{
"id": "key123",
"name": "Production Key",
...
}
]
}
The Redis database is successfully backed up and restored. The new node now contains all Node API users, access keys, and transfer history from the primary node.