Here is example about restoring postgres from s3 sigle file. It reads this file into stdout and redirects this strem into pg_restore
tool. But what if there are several gz files on s3? Is there a way to make pg_restore
read them whihout downloading into any temp folder?
About loop restoring
- First of all it is unclear how postgress handle this situation. I have 50-100
gz
files with different sizes. Yes they have a nems and can be sorted. But will postgres perform correct restore when I you only single file?
- Also loop leads to donwload all files into some folder. Files can be big. So it it better to restore them from s3 directly.