Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Replacing your Amazon DataSync agent
To replace an Amazon DataSync agent, you must create a new agent and update any transfer
locations that are using the old agent.
Creating a new agent
To create your new DataSync agent, follow the same process when you created your old agent:
Updating your location with the new agent
Once you create a new agent, you can update an existing DataSync location to use this
agent. In most cases, you also have to re-enter access credentials to update the
location. This is because DataSync stores location credentials in a way that only your
agent can use them.
The following instructions describe how to update locations by using the Amazon CLI. (You
can also do this by using the DataSync API.)
- NFS
-
-
Copy the following update-location-nfs command:
aws datasync update-location-nfs \
--location-arn datasync-nfs-location-arn
\
--on-prem-config AgentArns=new-datasync-agent-arn
-
For the --location-arn
parameter, specify the ARN of
the NFS location that you're updating.
-
For the --on-prem-config
parameter’s
AgentArns
option, specify the ARN of your new
agent.
You can specify more than one ARN if you're replacing multiple agents for a
location.
-
Run the update-location-nfs
command to update the
location.
- SMB
-
-
Copy the following update-location-smb command:
aws datasync update-location-smb \
--location-arn datasync-smb-location-arn
\
--agent-arns new-datasync-agent-arn
\
--password smb-file-server-password
-
For the --location-arn
parameter, specify the ARN of
the SMB location that you're updating.
-
For the --agent-arns
parameter, specify the ARN of
your new agent.
You can specify more than one ARN if you're replacing multiple agents for a
location.
-
For the --password
parameter, specify the password of
the user that can mount your SMB file server and has permission to
access the files and folders involved in your transfer.
-
Run the update-location-smb
command to update the
location.
- HDFS
-
-
Copy the following update-location-hdfs command:
aws datasync update-location-hdfs \
--location-arn datasync-hdfs-location-arn
\
--agent-arns new-datasync-agent-arn
\
--kerberos-keytab keytab-blob
-
For the --location-arn
parameter, specify the ARN of
the HDFS location that you're updating.
-
For the --agent-arns
parameter, specify the ARN of
your new agent.
You can specify more than one ARN if you're replacing multiple agents for a
location.
-
If you're using Kerberos authentication, use the
--kerberos-keytab
parameter to specify the Kerberos
key table (keytab) that contains mappings between the defined
Kerberos principal and encrypted keys.
You can specify the keytab from a file by providing the file’s
address.
-
Run the update-location-hdfs
command to update the
location.
- Object storage
-
-
Copy the following update-location-object-storage command:
aws datasync update-location-object-storage \
--location-arn datasync-object-storage-location-arn
\
--agent-arns new-datasync-agent-arn
\
--secret-key bucket-secret-key
-
For the --location-arn
parameter, specify the ARN of
the object storage location that you're updating.
-
For the --agent-arns
parameter, specify the ARN of
your new agent.
You can specify more than one ARN if you're replacing multiple agents for a
location.
-
For the --secret-key
parameter, specify the secret
key that allows DataSync to access your object storage bucket.
-
Run the update-location-object-storage
command to
update the location.
- Azure Blob Storage
-
Do the following to update your Microsoft Azure Blob
Storage location:
-
Copy the following update-location-azure-blob command:
aws datasync update-location-azure-blob \
--location-arn datasync-azure-blob-storage-location-arn
\
--agent-arns new-datasync-agent-arn
\
--sas-configuration '{
"Token": "sas-token-for-azure-blob-storage
"
}'
-
For the --location-arn
parameter, specify the ARN of
the Azure Blob Storage location that you're
updating.
-
For the --agent-arns
parameter, specify the ARN of
your new agent.
You can specify more than one ARN if you're replacing multiple agents for a
location.
-
For the --sas-configuration
parameter's
Token
option, specify the shared access signature (SAS)
token that allows DataSync to access your blob
storage.
-
Run the update-location-azure-blob
command to update
the location.
Next steps
-
Delete your old agent. If you have any
running DataSync tasks using this agent, wait until those tasks finish before
deleting it.
-
If you need to replace agents for multiple locations, repeat the previous
steps.
-
When you’re done, you can resume running your tasks.