New topic: 

Backup PostgreSQL

<http://forums.realsoftware.com/viewtopic.php?t=47909>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        jetpr          Post subject: Backup PostgreSQLPosted: Fri May 
17, 2013 5:22 pm                                 
Joined: Wed Sep 20, 2006 5:12 pm
Posts: 673
Location: Puerto Rico                if some one now how to do Backup to a 
PostgreSQL DataBase Backup from a RS Application.

     
_________________
Thanks for any contribution  and  God blesses all (I start Using RS in 
10/12/2010)
 Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 
Personal  and  Linux RS2012r1 Personal Register user 
   my Hobbies R/C Turbines Jets Models  
                             Top                Thom McGrath          Post 
subject: Re: Backup PostgreSQLPosted: Fri May 17, 2013 5:24 pm                  
     Site Admin                
Joined: Tue May 06, 2008 1:07 pm
Posts: 1460
Location: NotEvenOnTheMap, CT                Don't try from within the app. 
It'll take an exceedingly long time. Instead use the pg_dump or pg_dumpall 
command line tools on the server, they are DRAMATICALLY faster and can run 
without taking the database offline.      
_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.  
                             Top                taylor-design          Post 
subject: Re: Backup PostgreSQLPosted: Fri May 17, 2013 8:48 pm                  
       
Joined: Wed Mar 22, 2006 11:15 am
Posts: 690
Location: Southern California                Note that you can run pg_dump and 
pg_dumpall from an RB application using the Shell class. This is nice if you 
need to provide a simple backup command, or if you want to check the result and 
send out alerts in the event of a failure.      
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top                jetpr          Post subject: 
Re: Backup PostgreSQLPosted: Fri May 17, 2013 10:05 pm                          
       
Joined: Wed Sep 20, 2006 5:12 pm
Posts: 673
Location: Puerto Rico                if any example to check the result and 
send out alerts in the event of a failure
     
_________________
Thanks for any contribution  and  God blesses all (I start Using RS in 
10/12/2010)
 Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 
Personal  and  Linux RS2012r1 Personal Register user 
   my Hobbies R/C Turbines Jets Models  
                             Top                taylor-design          Post 
subject: Re: Backup PostgreSQLPosted: Sat May 18, 2013 2:11 pm                  
       
Joined: Wed Mar 22, 2006 11:15 am
Posts: 690
Location: Southern California                jetpr wrote:if any example to 
check the result and send out alerts in the event of a failure
 

Pass whatever string you would type on the command line to Shell.Execute. 
Shell.DataAvailable will let you read the output. Shell.Completed will let you 
know when it's done, and you can check Shell.ErrorCode in the Completed event 
for any errors.

A ready to run example is difficult because I don't know the path to pg_dump on 
your system, nor the database or options you wish to use for the backup. Check 
out the documentation for pg_dump:
http://www.postgresql.org/docs/9.2/stat ... gdump.html

Figure out the command you want to send to pg_dump and test it on the command 
line first. Once you have that, the RB side is simple.
http://docs.realsoftware.com/index.php/Shell      
_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to