Re: Automated backup
От | Ken Godee |
---|---|
Тема | Re: Automated backup |
Дата | |
Msg-id | 3E5C9248.2774.51B544@localhost обсуждение исходный текст |
Ответ на | Automated backup ("Robert Fitzpatrick" <robert@webtent.com>) |
Список | pgsql-general |
Not sure if I'm reading your email correctly, but I use several bash scripts to import data daily. Even thought the cron/scripts are owned and run by root, root doesn't have permissions with postgres so your script can use the "su -c" command as a user who has permissions, ie. su - user -c "pg_dumpall" The "-c" switch will run just one command and return to previous user. > I have a script that tars up dirs for me each night and I've added a > pg_dumpall function to the script, but having problem with > authentication. I created a .pgpass file in the root user folder with > the appropriate permissions (600). However, even though the script is > owned by root, it does not run. I guess the .pgpass file is not loading > unless root actually logs in. Can anyone shed light on the best way to > get pg_dump to work unattended or point me in the right direction. > > -- > Robert > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >
В списке pgsql-general по дате отправления: