Changeset 91

Show
Ignore:
Timestamp:
03/09/10 22:12:48 (4 years ago)
Author:
depesz
Message:

change the strftime % marker to - also to avoid clash with postgresql % usage

Files:

Legend:

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

    r89 r91  
    3838 
    3939Name of logfile (actually template, as it supports %% L<strftime(3)> 
    40 markers 
     40markers. Unfortunately due to the %x usage by PostgreSQL, We cannot use %% 
     41macros directly. Instead - any occurence of ^ character in log dir will be first 
     42changed to %, and later on passed to strftime. 
    4143 
    4244=item --state-dir (-s) 
     
    222224=head3 2 remote, compressed destinations, 1 local, with auto rotated logfile: 
    223225 
    224     archive_command='/.../omnipitr-archive -D /mnt/data/ -l /var/log/omnipitr/archive-%Y-%m-%d.log -dr gzip=rsync://slave/postgres/wal_archive/ -dr bzip2=backups@backupserver:/mnt/backups/wal_archive/ -dl /mnt/wal_archive/ -s /var/lib/postgres/.omnipitr/ "%p"' 
     226    archive_command='/.../omnipitr-archive -D /mnt/data/ -l /var/log/omnipitr/archive-^Y-^m-^d.log -dr gzip=rsync://slave/postgres/wal_archive/ -dr bzip2=backups@backupserver:/mnt/backups/wal_archive/ -dl /mnt/wal_archive/ -s /var/lib/postgres/.omnipitr/ "%p"' 
    225227 
    226228=head2 COPYRIGHT 
  • trunk/omnipitr/doc/omnipitr-master-backup.pod

    r89 r91  
    5656 
    5757Name of logfile (actually template, as it supports %% L<strftime(3)> 
    58 markers 
     58markers. Unfortunately due to the %x usage by PostgreSQL, We cannot use %% 
     59macros directly. Instead - any occurence of ^ character in log dir will be first 
     60changed to %, and later on passed to strftime. 
    5961 
    6062=item --filename-template (-f) 
     
    211213being: 
    212214 
    213     __HOSTNAME__-__FILETYPE__-%Y-%m-%d.tar__CEXT__ 
     215    __HOSTNAME__-__FILETYPE__-^Y-^m-^d.tar__CEXT__ 
    214216 
    215217Within template (specified with --filename-template option) you can use 
     
    233235compression program. 
    234236 
    235 =item * any %? markers 
    236  
    237 like in L<strftime(3)> call
    238  
    239 =back 
    240  
    241 Filename template is evaluated at start, so any timestamp (%? markers) will 
     237=item * any ^? markers 
     238 
     239like in L<strftime(3)> call, but ^ will be changed to % first
     240 
     241=back 
     242 
     243Filename template is evaluated at start, so any timestamp (^? markers) will 
    242244relate to date/time of beginning of backup process. 
    243245 
     
    255257and modified filenames 
    256258 
    257     /.../omnipitr-master-backup -D /mnt/data/ -l /var/log/omnipitr/backup-%Y-%m-%d.log -dr bzip2=rsync://slave/postgres/backups/ -dr gzip=backups:/mnt/hotbackups/ -dl /mnt/backups/ -f "main-__FILETYPE__-%Y%m%d_%H%M%S.tar__CEXT__" 
     259    /.../omnipitr-master-backup -D /mnt/data/ -l /var/log/omnipitr/backup-^Y-^m-^d.log -dr bzip2=rsync://slave/postgres/backups/ -dr gzip=backups:/mnt/hotbackups/ -dl /mnt/backups/ -f "main-__FILETYPE__-^Y^m^d_^H^M^S.tar__CEXT__" 
    258260 
    259261=head2 COPYRIGHT 
  • trunk/omnipitr/doc/omnipitr-monitor.pod

    r64 r91  
    1212 
    1313It can contain strftime-type marks - just like --log argument to other 
    14 I<OmniPITR> programs. 
     14I<OmniPITR> programs.. Unfortunately due to the %x usage by PostgreSQL, We cannot use %% 
     15macros directly. Instead - any occurence of ^ character in log dir will be first 
     16changed to %, and later on passed to strftime. 
    1517 
    1618=item * --check (-c) contains name of check that should be performed. 
     
    6466=over 
    6567 
    66 =item * Date time in format: %Y-%m-%d %H:%M:%S (for example: 2009-12-24 
     68=item * Date time in format: ^Y-^m-^d ^H:^M:^S (for example: 2009-12-24 
    676915:45:32) 
    6870 
     
    8385=head3 Getting age of last archive: 
    8486 
    85     .../omnipitr-monitor -l /var/log/omnipitr/archive-%Y-%m-%d.log -c last-archive-age -s /var/lib/omnipitr 
     87    .../omnipitr-monitor -l /var/log/omnipitr/archive-^Y-^m-^d.log -c last-archive-age -s /var/lib/omnipitr 
    8688 
    8789=head3 Getting age of last wal restore: 
    8890 
    89     .../omnipitr-monitor -l /var/log/omnipitr/restore-%Y-%m-%d.log -c last-restore-age -s /var/lib/omnipitr 
     91    .../omnipitr-monitor -l /var/log/omnipitr/restore-^Y-^m-^d.log -c last-restore-age -s /var/lib/omnipitr 
    9092 
    9193=head3 Getting errors for raporting: 
    9294 
    93     .../omnipitr-monitor -l /var/log/omnipitr/archive-%Y-%m-%d.log -c errors -s /var/lib/omnipitr 
     95    .../omnipitr-monitor -l /var/log/omnipitr/archive-^Y-^m-^d.log -c errors -s /var/lib/omnipitr 
    9496 
    9597=head3 Getting errors for raporting, but checking always only last 10 minutes of 
    9698logs: 
    9799 
    98     .../omnipitr-monitor -l /var/log/omnipitr/archive-%Y-%m-%d.log -c errors -s /var/lib/omnipitr --from=600 
     100    .../omnipitr-monitor -l /var/log/omnipitr/archive-^Y-^m-^d.log -c errors -s /var/lib/omnipitr --from=600 
    99101 
    100102=head2 COPYRIGHT 
  • trunk/omnipitr/doc/omnipitr-restore.pod

    r89 r91  
    6464 
    6565Name of logfile (actually template, as it supports %% L<strftime(3)> 
    66 markers 
     66markers. Unfortunately due to the %x usage by PostgreSQL, We cannot use %% 
     67macros directly. Instead - any occurence of ^ character in log dir will be first 
     68changed to %, and later on passed to strftime. 
    6769 
    6870=item --pid-file 
  • trunk/omnipitr/doc/omnipitr-slave-backup.pod

    r89 r91  
    3838 
    3939Name of logfile (actually template, as it supports %% L<strftime(3)> 
    40 markers 
     40markers. Unfortunately due to the %x usage by PostgreSQL, We cannot use %% 
     41macros directly. Instead - any occurence of ^ character in log dir will be first 
     42changed to %, and later on passed to strftime. 
    4143 
    4244=item --filename-template (-f) 
     
    190192being: 
    191193 
    192     __HOSTNAME__-__FILETYPE__-%Y-%m-%d.tar__CEXT__ 
     194    __HOSTNAME__-__FILETYPE__-^Y-^m-^d.tar__CEXT__ 
    193195 
    194196Within template (specified with --filename-template option) you can use 
     
    212214compression program. 
    213215 
    214 =item * any %? markers 
    215  
    216 like in L<strftime(3)> call
    217  
    218 =back 
    219  
    220 Filename template is evaluated at start, so any timestamp (%? markers) will 
     216=item * any ^? markers 
     217 
     218like in L<strftime(3)> call, but ^ will be first changed to %
     219 
     220=back 
     221 
     222Filename template is evaluated at start, so any timestamp (^? markers) will 
    221223relate to date/time of beginning of backup process. 
    222224 
     
    234236and modified filenames 
    235237 
    236     /.../omnipitr-slave-backup -D /mnt/data/ -l /var/log/omnipitr/backup-%Y-%m-%d.log -dr bzip2=rsync://slave/postgres/backups/ -dr gzip=backups:/mnt/hotbackups/ -dl /mnt/backups/ -f "main-__FILETYPE__-%Y%m%d_%H%M%S.tar__CEXT__" 
     238    /.../omnipitr-slave-backup -D /mnt/data/ -l /var/log/omnipitr/backup-^Y-^m-^d.log -dr bzip2=rsync://slave/postgres/backups/ -dr gzip=backups:/mnt/hotbackups/ -dl /mnt/backups/ -f "main-__FILETYPE__-^Y^m^d_^H^M^S.tar__CEXT__" 
    237239 
    238240=head2 COPYRIGHT 
  • trunk/omnipitr/lib/OmniPITR/Program/Archive.pm

    r90 r91  
    303303 
    304304    croak( '--log was not provided - cannot continue.' ) unless $args{ 'log' }; 
     305    $args{ 'log' } =~ tr/^/%/; 
    305306 
    306307    for my $key ( qw( data-dir temp-dir state-dir pid-file verbose gzip-path bzip2-path lzma-path ) ) {