I'm working on restoring a backup from on-premise postgresql to another postgresql database hosted in AWS (rds-aurora postgresql, serverless). The data size is 170gb of compressed data.
I earlier thought to do using pg_restore because I can pass the -j
option, but it's taking a lot of time and space to extract the files.
My file is in the format = tar.gz (20200204_data_tar.gz)
I tried to extract and pass it to pg_restore using pipe to save time , but got the below error. Note : backup was generated using pg_start_backup.
tar -xzOf 20200204_data_tar.gz | pg_restore
--host=my-test.us-east-1.rds.amazonaws.com --port=5432 --username=postgresql--dbname=mytest -j 16 --password --verbose --exit-on-error --data-only
pg_restore: [archiver] input file does not appear to be a valid archive
On-premise version 9.3.4 New Cluster version is using 10.7
Can someone please suggest me options on how to do a restore for this large database?
20200204_data_tar.gz
), please edit your question and add the complete command you used to create that file.