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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ