Re: Base Backups to a remote location - Mailing list pgsql-admin

From Craig James
Subject Re: Base Backups to a remote location
Date
Msg-id CAFwQ8reRn9cVo3KKQMRHbAm6UU5XC62ERzvuWTXM3RxmP5pqbA@mail.gmail.com
Whole thread Raw
In response to Re: Base Backups to a remote location  (Boris Bukowski <bukowski@louis.info>)
List pgsql-admin
On Fri, Dec 6, 2013 at 6:43 AM, Boris Bukowski <bukowski@louis.info> wrote:
On 06.12.2013 12:49, Giuseppe Broccolo wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Il 06/12/2013 11:05, Boris Bukowski ha scritto:
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@${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?

In principle, this could be enough. ...
These are complete VM's with Webserver and Postgres. Once per day I take a complete snapshot of everything and feed it in our backup system.

Is this enough to get my Database always up again or do i miss something? Continuous Archiving is not my intention.

Why not try it?  Start Postgres running on your backup machine, and see if it works.  You should be able to scan through all of your tables with simple "select ..." statements and verify that they're all correct.  Then stop Postgres.

One of the nice things about rsync is that it will erase any changes you make to your backup. After you test your backup, it will no longer match your production version.  But the next time you run rsync, it will erase all of the changes to your backup and make it match the production version again.

Craig
 

best Regards
Boris Bukowski



--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

pgsql-admin by date:

Previous
From: Boris Bukowski
Date:
Subject: Re: Base Backups to a remote location
Next
From: Scott Ribe
Date:
Subject: Re: Base Backups to a remote location