Search Postgresql Archives

Re: Cannot start the postgres service

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

 



Let me clarify bit more so I can do thing in proper manner...

I take base backup(full).

at fixed interval I need to take incremental backup and for that...

I use following commands.

psql -U postgres -c "select pg_switch_xlog()"

psql -U postgres -c "SELECT pg_stop_backup()"

after that the WAL file(s) is/are archived & I consider that file as a file
which will be used for backup along with all files exist in the pg_xlog dir.

same approach is mentioned in the 
http://www.mkyong.com/database/postgresql-point-in-time-recovery-incremental-backup/

Am I doing things properly??

I know how to restore data from the full backup but havn't done anything to
restore data from the WAL files...Hopefully I will find the way...If u can
emphasize somewhere then it will be a gr8 help :)

Please correct me if I am wrong somewhere :)


Alvaro Herrera-7 wrote:
> 
> Mitesh51 wrote:
> 
>> I had 2 approach in my mind...to sync up transaction log files with
>> specific
>> full backup
>> 
>> 1) to keep only time relavent files in pg_xlog dir and move other files
>> to
>> archive dir with code which is not a good idea as u suggest
> 
> Postgres is prepared to (and assumes it can) reuse and delete files in
> pg_xlog.  If you need a copy you can use for your own purposes, you MUST
> get it through an archive_command.  You MUST NOT fiddle with the files
> in pg_xlog directly.
> 
> Also note that your archive_command needs to create a separate copy of
> the file.  Hardlinks are not allowed, because the file might get
> rewritten by Postgres later.  Moving (mv) the original files is not
> allowed either for the same reason.  Postgres will leave the file alone
> until it has been archived, and assumes it can do whatever it pleases
> with it as soon as the archiver has returned success (exit code 0).
> 
> -- 
> Alvaro Herrera                               
> http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
> 
> 

-- 
View this message in context: http://www.nabble.com/Cannot-start-the-postgres-service-tp25867194p25904095.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux