Re: Backup Database Question
| От | John R Pierce |
|---|---|
| Тема | Re: Backup Database Question |
| Дата | |
| Msg-id | 4E8DFDA5.3030506@hogranch.com обсуждение исходный текст |
| Ответ на | Re: Backup Database Question (Carlos Mennens <carlos.mennens@gmail.com>) |
| Ответы |
Re: Backup Database Question
|
| Список | pgsql-general |
On 10/06/11 8:26 AM, Carlos Mennens wrote:
> Yes I agree but I didn't know enough about PostgreSQL to make that
> determination. Seems very logical however. Does anyone know of a
> PostgreSQL backup script floating around the Internet for Linux
> systems? I found a great one for MySQL but sadly that doesn't do me
> any good.
/path/to/pg_dumpall | gzip > /path/to/pgbackup-$(date -I).sql.gz
put this in a script accessible by the postgres user, and in the
postgres user's crontab, invoke it something like..
30 1 * * * /path/to/backupscript
to run it every night at 1:30am. If you only want to run it once a week...
30 1 * * 6 /path/to/backupscript
which will run it on Saturday morning at 1:30am (day 6)
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
В списке pgsql-general по дате отправления: