[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automating backups



I have no problems with accepting contributor code in this area or
elsewhere.  I don't know if you are offering, but if you are... ;-)
Note that this is an area where community members who do a lot if
implementations may find value in being able to point to their
contributions.

If not, file a feature request.

Best Wishes,
Chris Travers

On 4/4/07, Peter Houppermans <..hidden..> wrote:

 Chris,

 [pg_dump et al]

 I think there's scope for creating some script that handles the backup
automagically so it can be stuck in a cron job.  The idea is to give people
a framework to work with - adding FTP/SCP/DVD burning/switching on coffee
makers is up to local conditions - and ideally this backup should be in a
format that allows restore of the complete accounts as well as the code
(also allows for making backups prior to fundamental structural changes in
code/database - always nice to be able to go back the old "machine").

 In addition to that, lesson no 1 of Business Continuity Processes is that a
backup is not a backup unless you (a) can  restore it and (b) regularly test
and exercise the restore process - ergo a restore methodology would not go
amiss either.

 Bottom line: good question that probably deserves more attention re answer,
not everyone is a (very responsive) top coder like you :-).
 As for disasters, I've been there re. failing and incomplete backups - it's
not the most popular discovery at 4am when you're busy reviving a system
that is needed 9am..  This means that the steps prior to restoring the DB as
you describe in part (2) of your answer probably need scripting too (most
likely by using a complete tar.gz archive of code and db dump).

 /// P ///



 pg_dump is the supported way of doing backups in LedgerSMB.

LedgerSMB uses pg_dump internally for backups. It is the best way to
backup the database in this software and has the fewest problems.

SQL-Ledger uses its own routines becase of the idea that some day
non-PostgreSQL databases may again be supported. Also pg_dump prior
to 8.0 had known issues handling dependencies and sometimes this meant
that it was difficult or impossible to restore the data in a large
backup. Since we only support PostgreSQL 8.0 and higher, these
problems don't affect us.

Also, just to help ensure that the process is understood, here is a
little about the process:
1) pg_dump takes essentially a snapshot of the difference between
template0 and the target database. This means that anything added to
template1 or the current database is added.

2) To restore, you have to create a new database and pipe through
psql. If you get errors, you might have something wrong with
template1. You can fix this by creating your new database with the -T
template0 option.

Best Wishes,
Chris Travers

On 4/3/07, Joshua D. Drake <..hidden..> wrote:


 Glen Morris wrote:


 I would like to use a server side script to create the LedgerSMB backs
for each database. Are there any such scripts?

 pg_dump



 Glen


------------------------------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


------------------------------------------------------------------------

_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

 --

 === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
 http://www.commandprompt.com/

Donate to the PostgreSQL Project:
http://www.postgresql.org/about/donate
PostgreSQL Replication:
http://www.commandprompt.com/products/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users





-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users