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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠