Re: Locking Tables & Backup Inquiry
От | Andy Colson |
---|---|
Тема | Re: Locking Tables & Backup Inquiry |
Дата | |
Msg-id | 4EE8ED1B.6000608@squeakycode.net обсуждение исходный текст |
Ответ на | Re: Locking Tables & Backup Inquiry (Carlos Mennens <carlos.mennens@gmail.com>) |
Ответы |
Re: Locking Tables & Backup Inquiry
|
Список | pgsql-general |
On 12/14/2011 12:26 PM, Carlos Mennens wrote: > On Wed, Dec 14, 2011 at 1:15 PM, Andy Colson<andy@squeakycode.net> wrote: >> Yep, you simply cron a pg_dump. (dumpall if you want users/roles and all >> databases). No locking needed. > > So how would one put this in cron if I wanted to run this everyday? > > 0 * * * * /usr/bin/pg_dumpall> pg_dumpall.$DATE.sql > > Will that work above assuming I wanted to run this every day at that > specific time? I'm just guessing since I've never created a Crontab or > messed with PG backups. > google is your friend. this'll run every hour. > 0 * * * * /usr/bin/pg_dumpall> pg_dumpall.$DATE.sql try: 0 4 * * * /usr/bin/pg_dumpall> pg_dumpall.$DATE.sql that'll run at 4am every day. Watch the path's, who know's what directory is current: 0 4 * * * /usr/bin/pg_dumpall > /backup/pg_dumpall.$DATE.sql -Andy
В списке pgsql-general по дате отправления: