I want to run a postgres dump from a remote server which will take a couple of hours.
I am using a bash script on the target to do so and start it with at
Now, in order to prevent things from breaking I use nohup, but am not sure whether this is even needed (due to starting the script with at) and whether it would be better to use in in the pg_dump command directly (see below) or rather starting the script with nohup and skip it in the command itself.
command in the script currently is:
nohup nice pg_dump -h ${SOURCE} -d ${DB_NAME} -U ${DB_USER} -v -Fd -j 2 \
-f ${DUMPDIR}/${DUMPFILE}_"${NOW}" > ${DUMPDIR}/${DUMPFILE}_"${NOW}".out