๐Ÿš€ How to Use OVH S3 and Storage Gateway for File Transfers and Backups

OVH Cloud offers powerful object storage services through its S3-compatible API and robust Storage Gateway. This guide covers setup, file transfers, and backup procedures using both methods.


โ˜๏ธ OVH S3 Basics

Endpoints:

  • Standard: https://s3.sbg.io.cloud.ovh.net
  • High-Performance: https://s3.sbg.perf.cloud.ovh.net

Other Details:

  • Bucket Name: your-bucket-name
  • Region: sbg

๐Ÿ› ๏ธ Setting Up AWS CLI for OVH S3

1. Configure AWS CLI:

aws configure --profile ovh
  • Enter your OVH Access Key, Secret, and Region: sbg

2. Edit AWS Config File:

Open ~/.aws/config and add:

[profile ovh]
region = sbg
output = json
s3 =
    endpoint_url = https://s3.sbg.io.cloud.ovh.net

๐Ÿ‘‰ For High-Performance:
Replace the endpoint_url with:

https://s3.sbg.perf.cloud.ovh.net

๐Ÿ“ Uploading & Downloading Files with AWS CLI

๐Ÿ”ผ Upload File

aws s3 cp /path/to/your/file s3://your-bucket-name/ --profile ovh

๐Ÿ”ฝ Download File

aws s3 cp s3://your-bucket-name/your-file.txt /destination/path --profile ovh

๐Ÿ“ƒ List Bucket Contents

aws s3 ls s3://your-bucket-name/ --profile ovh

๐Ÿ›ฐ๏ธ Accessing OVH Storage Gateway

Gateway Host:
gateways.storage.gra.cloud.ovh.net

๐Ÿ” Credentials Format

Use the following format for authentication:

OS_TENANT_ID:OS_USERNAME:GENERATED_PASSWORD

Example:

1234567890123456.user-ExampleUser.ExampleGeneratedPassword123

๐Ÿ” Using Rsync with OVH Storage Gateway

๐Ÿ“ค Upload a Directory

rsync -avp --progress -e "ssh -p 22" /local/backup-folder username@gateways.storage.gra.cloud.ovh.net:./remote-folder-name

๐Ÿ“ฅ Download a Directory

rsync -rt username@gateways.storage.gra.cloud.ovh.net:/remote-folder-name /local/restore-folder

๐Ÿ’ก Pro Tips

  • โœ… Use --dry-run with rsync to test before actual execution: rsync -av --dry-run ...
  • โš ๏ธ Be cautious with --delete โ€” it removes files from the destination not found in the source.
  • ๐Ÿ” Secure all credentials, especially SSH and API keys.
Scroll to Top