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 Risposte
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
ESPERTO
con risposta 8 mesi fa
  • 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
con risposta 8 mesi fa
0
Risposta accettata

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
ESPERTO
con risposta 8 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande