Re: CRON Jobs and Backups
От | Tom Lane |
---|---|
Тема | Re: CRON Jobs and Backups |
Дата | |
Msg-id | 25900.1118119407@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | CRON Jobs and Backups (<operationsengineer1@yahoo.com>) |
Список | pgsql-novice |
<operationsengineer1@yahoo.com> writes: > as i understand it... the following should enable me > to backup via cron: > PGUSER=postgres > PGPASSWORD=password > export PGUSER PGPASSWORD > pg_dump databasename | gzip > databasename.bak.gz This is probably a pretty bad way to handle the password --- on many Unix variants, anyone can see the list of environment variables that is passed down to the pg_dump process. It'd be far safer to put the password in a ~/.pgpass file owned by the Unix user that runs the cron job. > my interfaces is cpanel and it only gives me one line > to type this in... can i replace the returns with a > space and will this still work? Get a better user interface ;-). Or put the whole mess in a script file and invoke the script file from your cron job. regards, tom lane
В списке pgsql-novice по дате отправления: