70 points · by nitesh_aws · 6y ago · 61 comments
Can you tell us more about the use case? I'm not sure I understand the need here, or how it might improve your work patterns.
Also, note that this is an export feature, not a backup/restore feature. Aurora already has native backup/restore: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide...
https://aws.amazon.com/about-aws/whats-new/2018/05/amazon-au...
When we restore we have to go through the process of configuring a new instance from that snapshot. Where you have to select the security group, availability zone, set it to not public (which btw revert to yes once you select some availability zone) etc.
This process is rather error prone and honestly annoying if you do it multiple times.
At the moment, when you try and click 'Restore to point in time' it's just taking you through the new instance wizard with the snapshot being used as the initial dataset. Screenshot: https://i.imgur.com/vBiqgJg.png -- the 'restore to point in time' is extremely misleading.
My specific uses case would be for PostgreSQL and/or MySQL, I do not use nor have I tried Aurora.
I can't get the S3 export to work either. Screenshot: https://i.imgur.com/nabbsMr.png
I need to grab a single row out of a snapshot from our staging database. So far I have restored the DB once and our QA team was able to reproduce a bug. They began testing prior to me pulling the data out, so now I am re-cloning an instance to fetch the unmolested data from that DB.
tl;dr - allow me restore a snapshot like every other piece of software that has a snapshotting component. caveat is that this will likely need to be an offline process, but as long as that is noted and clear, that is going to help a LOT of people out.
We have this in Aurora already. If you migrate to Aurora (which is MySQL/Postgres compatible), you'll get this functionality out of the box.
Also Glacier export would be nice for long term cold storage of database backups.
But a restore capability is essential.
I think this is a replacement for rolling your own database exports for analytics applications with Sqoop or Spark.
AWS DMS also supports incrementals (using the change-data-capture features in the DB).
backup storage on postgresql is billed at $ $0.095 per GiB-month same on Aurora is billed at $0.023 per GB-month
If you include Glacier, then it is 100x. I truly believe that AWS charges these costs because they make a crazy amount of premium with that. And that is why these exports are architected to be non-restorable.
We use snapshots for regular backups, and have implemented a solutions to share and copy snapshots to a different aws account.
But given that our production database is absolutely vital to the existence of the company I’d like to have an easy way to create a secure ‘not affliated with Amazon’ copy regularly in case of the nightmare scenario where an account is compromised/terminated
rsync.net has 'rclone' built into the environment[1] so it is trivially easy to call rclone, over SSH:
ssh user@rsync.net rclone s3:/some/bucket /rsync/account
... and perform arbitrary data movements into, out of, and between S3/glacier/nearline/gdrive resources. Your "out-of-aws solution" contains ZFS snapshots, on any schedule you like, so you can just do a "dumb" sync to rsync.net and handle the retention with the snapshot schedule.Also, the snapshots are immutable (read-only) so your data gains some protection against ransomware and other threats like accidental deletion.
You should trust us with your backups because we've been doing this since 2001.
How do you do this if the db is encrypted? Or rather, how do you restore from the encrypted backup in the second account if the master key in the original account is somehow deleted without anyone noticing and intervening before the deletion becomes finalized?
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_...
One day in S3 = 10 days in Glacier and since Glacier is presumably for years, the cost difference is trivial.
I pass some flags to mysqldump to avoid locking the db and otherwise interfering with production. It also dumps from the reader node not the writer.
I also clear some tables and restore it daily to a development DB.
Sadly this looks like it only supports parquet, a rather usual db dump format. Even if, I'm sure, it's way more efficient to process using some modern tools than a text sql dump.
I just like open formats and interoperability and AWS's rds offerings are always just slightly 'off'.
Would have preferred CSV as well, though, easier to work with. There’s also a little known feature called S3 Select that allows you to run SQL on S3 files and selectively retrieve data, which is what Parquet is for in the first place.
For operational tasks, still, the only option (besides RDS cloning) for Postgres is pg_dump or pg_transport, losing physical layout.