Base Backups to a remote location

From: Boris Bukowski <bukowski(at)louis(dot)info>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Base Backups to a remote location
Date: 2013-12-06 10:05:53
Message-ID: MP75BCF26F00D12852A1A181.6040300@louis.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

i use the following script to backup servers every day to a remote location.

---snip---
REMOTE=xyz123.louis.info
DATE=`date +%Y%m%d%H%M%S`

ssh xyz123.louis.info "echo \"checkpoint; SELECT
pg_start_backup('${DATE}');\" |psql"

rsync -avxz --numeric-ids --exclude-from=/backup1/config/excludes.txt
--delete-excluded --inplace --delete root(at)${REMOTE}:/
/mnt/backup1/remote/xyz123/full

ssh xyz123.louis.info "echo \"SELECT pg_stop_backup();\" |psql"

---snip---

i have some questions about this:
1. will this always work?
2. between these backups i do not save the archive logs, is this secure?
3. is it save to empty the archive directory befor i do a backup with
pg_start_backup()?

best Regards
Boris Bukowski

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Giuseppe Broccolo 2013-12-06 11:49:33 Re: Base Backups to a remote location
Previous Message Jorge Torralba 2013-12-05 17:14:29 pg_archivecleanup issues