Closed riccardospeggiorin-centropaghe closed 1 year ago
I saw the command for restoring in a new container
docker run --rm --tty --interactive -v $BACKUPFILE:/tmp/backupfile.sql.gz postgres:$VERSION /bin/sh -c "zcat /tmp/backupfile.sql.gz | psql --host=$HOSTNAME --port=$PORT --username=$USERNAME --dbname=$DBNAME -W"
Am I getting this right? This create a new fresh container with the postresql dump that I specify? Why I need to specify the $HOSTNAME if is a new container? thanks
I figured it out.
I saw the command for restoring in a new container
docker run --rm --tty --interactive -v $BACKUPFILE:/tmp/backupfile.sql.gz postgres:$VERSION /bin/sh -c "zcat /tmp/backupfile.sql.gz | psql --host=$HOSTNAME --port=$PORT --username=$USERNAME --dbname=$DBNAME -W"
Am I getting this right? This create a new fresh container with the postresql dump that I specify? Why I need to specify the $HOSTNAME if is a new container? thanks