Copy File from on-prem server to S3

0

Hi

I have an on-prem server with a DB backup file. I need to copy this to a new RDS machine in the AWS cloud. The on-prem data center has Direct connect with cloud. I assume I need to copy file to S3 bucket and then from S3 to RDS using S3 integration.

What command would you use on the on-prem server to copy the file from source to destination?

3 個答案
1

Hi,

You can use 2 commands via CLI to copy this file:

  1. aws s3 cp: https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html
  2. aws s3 sync: https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html

Sync may become more interesting in the future for you when you have directories with lots of files and you don't know which ones were added since your last sync:

Syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination. Only creates folders in the destination if they contain one or more files.

To obtain best performances, have a look at https://repost.aws/knowledge-center/s3-improve-transfer-sync-command

Best,

Didier

profile pictureAWS
專家
已回答 8 個月前
  • I dont think the AWS CLI is installed on the LINUX server. I doubt they would install too. Is not there a way to use the Linux OS built-in commands like scp or cp directly?

1

Hi Sam,

You could use AWS DataSync to copy your DB Backup file.

https://aws.amazon.com/blogs/storage/synchronizing-your-data-to-amazon-s3-using-aws-datasync/

profile pictureAWS
Abi-P
已回答 8 個月前
0
已接受的答案

Hello.

If you simply want to copy files from on-premises to S3, you can do so using the AWS CLI.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/cp.html

aws s3 cp ./database-file-name s3://s3-name

If the volume or size of files is large, AWS DataSync may be used to move them faster.
https://docs.aws.amazon.com/datasync/latest/userguide/s3-cross-account-transfer.html

profile picture
專家
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南