| From: | Craig James <cjames(at)emolecules(dot)com> |
|---|---|
| To: | Boris Bukowski <bukowski(at)louis(dot)info> |
| Cc: | Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: Base Backups to a remote location |
| Date: | 2013-12-06 15:01:35 |
| Message-ID: | CAFwQ8reRn9cVo3KKQMRHbAm6UU5XC62ERzvuWTXM3RxmP5pqbA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On Fri, Dec 6, 2013 at 6:43 AM, Boris Bukowski <bukowski(at)louis(dot)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(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?
>>>
>>
>> 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://stream.boxwatch.ru/mailpref/pgsql-admin
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Craig James | 2013-12-06 15:12:44 | Cold backup with rsync -- WAL files? |
| Previous Message | Scott Ribe | 2013-12-06 14:51:11 | Re: Base Backups to a remote location |