Changeset 88

Show
Ignore:
Timestamp:
03/09/10 21:51:24 (4 years ago)
Author:
depesz
Message:

1. add default -D for omnipitr-restore
2. add hook for removal of wal segments - to be used to archive segments from slave, on the go

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/omnipitr/doc/omnipitr-restore.pod

    r61 r88  
    1111=item --data-dir (-D) 
    1212 
    13 Where PostgreSQL datadir is located (path) 
     13Where PostgreSQL datadir is located (path) (defaults to current working 
     14directory). 
    1415 
    1516=item --source (-s) 
     
    4445remove unneeded wal segments regardless of I<--removal-unneeded> option. This is 
    4546to provide a way to make backups on slave. 
     47 
     48=item --pre-removal-processing (-h) 
     49 
     50If given, argument will be treated as shell command to run when any segment will 
     51be removed from archive. 
     52 
     53If the hook will finish without errors - segment will be removed. If there will 
     54be errors - removal procedure will be postponed, and after some time, it will be 
     55retried. 
     56 
     57There will be one extra parameter attached, which will be name of the segment 
     58file to be processed (prepared in such a way that it will be relative to current 
     59working directory). 
     60 
     61Passed segment will always be uncompressed. 
    4662 
    4763=item --log (-l) 
     
    232248=back 
    233249 
     250=head3 Segment removal 
     251 
     252omnipitr-restore will automatically remove segments that are no longer 
     253necessary. 
     254 
     255To make it happen, it will periodically run I<pg_controldata> program, and check 
     256name of last segment required for redo. 
     257 
     258If pre-removal-processing is defined, it will be called before actuall removal. 
     259 
     260omnipitr-restore will remove segments chronologically - oldest segments first. 
     261 
     262One useful idea for pre-removal-processing, is using L<omnipitr-archive> for 
     263processing - to send xlog segments to some permanent storage place. 
     264 
    234265=head2 EXAMPLES 
    235266 
    236267=head3 Minimal setup: 
    237268 
    238     restore_command='/.../omnipitr-restore -D /mnt/data/ -l /var/log/omnipitr/restore.log -s /mnt/wal_restore/ %f %p' 
     269    restore_command='/.../omnipitr-restore -l /var/log/omnipitr/restore.log -s /mnt/wal_restore/ %f %p' 
    239270 
    240271=head3 Minimal setup, but with defined finish trigger and recovery delay (5 
     
    247278    restore_command='/.../omnipitr-restore -D /mnt/data/ -l /var/log/omnipitr/restore.log -s /mnt/wal_restore/ -w 300 -f /tmp/finish.trigger -r -p /tmp/pause.trigger %f %p' 
    248279 
     280=head3 Minimal setup, but with backing up segments to remote server: 
     281 
     282    restore_command='/.../omnipitr-restore -l /var/log/omnipitr/restore.log -s /mnt/wal_restore/ -h "/.../omnipitr-archive -l /var/log/omnipitr/archive.log -dr bzip2%rsync://backup/postgres/xlogs/" %f %p' 
     283 
    249284=head2 COPYRIGHT 
    250285