
Synopsis
========
Baklabel is intended for use in automated scripts to deliver a sensible directory path
fragment (or label) each day to construct a grandfathered local backup.

Import baklabel.Grandad to produce today's label fragment.

See test_baklabel.py for examples of how to call Grandad

It is also a stand-alone utility to find the backup label produced for any given date
and set of options.

python3 baklabel.py -h  to see command line usage and options.

Python 3.x (Python 2.7 should also work but is no longer tested)

In the doc directory of the baklabel repo, see release_note.txt for more detail on the
package, examples.txt for baklabel output examples and backup_howto.txt for a sample
backup script for Windows.

Usage:
    baklabel.py [Options]

Options:
    Without options, produce today's default label. If the current time is
    prior to 4am (switchover time) then produce yesterday's label.

    -d (default date is today) Or use eg., '-d 2010/3/30' or '-d 30-3-2010'
       Use / or - as date separators. Date format is guessed. Mth-day-year
       only works if day > 12.

       Use -1 for yesterday's label or -7 for last week's label. Use +2 for
       a label for the day after tomorrow. Any number will be computed.

       To adjust the switchover time use eg.,'-d 6am' or '-d 6pm' etc.

    -s (default is blank) server name used to prefix the backup label

    -y (default is True) Append year to end-of-year label. Or use '-y False'
       or '-y No'. Anything else means True.

    -m (default is False) Append year to end-of-month label. Or use '-m True'
       or '-m Yes'. Anything else means False.

    -n (default is 1) Month number commencing the new year. January is 1.

    -e (default is 'blank') end-of-year label only has an effect on new year's
       eve in any year. You may prefer '-e eoy' or '-e end-of-year' if you
       don't want a label like 'dec_2010' or 'dec'.

    -w (default is 4) Day number of weekly backups. Monday is 0, Sunday is 6

    -h (or -?) shows this help text and the default label for today ...
    