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-runwith 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.
