May Sale! All accounts are 40% off this week.

Swaz's avatar
Level 20

Strategy to backup files already in s3

I'm storing my apps files in Amazon s3 for the first time.

In the past I've saved my files locally and then used something like spatie/laravel-backup to create daily/weekly/monthly backups of those files, and those backups were stored on s3. I like the idea of having specific restore points like this.

Is there any way to do this if the files are already on s3?

Example: My app stores the files in region-1, and every night a zip of all files would be made and stored in region-2.

0 likes
3 replies
ChristophHarms's avatar

You could do this entirely inside the AWS ecosystem, using S3 and Glacier.

The only other possibility that comes to my mind is writing a script that downloads the data from S3, compresses them and re-uploads them to a backup location.

1 like
experimentor's avatar

@swaz @clab
AWS S3 has versioning. You can enable versioning on the bucket and it will retain versions of your files. You can also enable cross region bucket replication to make sure there is a backup in another region. These are all configurations. So no need to write any code to do this.

Here are the relevant links: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html

Please or to participate in this conversation.