Share

backup2l - low maintenance backup tool

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Determine backup level in Pre-backup script

You are viewing a single message from this topic. View all messages.

  1. 2008-10-23 18:18:10 UTC
    Dear John,

    in the present version it is not easily possible.

    But you may try the following:

    In file '/usr/bin/backup2l', function 'do_backup()': Change the order of the following code:


    # Run pre-backup
    echo "Running pre-backup procedure..."
    PRE_BACKUP

    # Operate in destination directory
    cd $BACKUP_DIR
    rm -fr $TMP.*

    # Remove old backups...
    echo
    echo "Removing old backups..."
    name_cleanup # should not do anything in normal cases
    compute_level_and_bids $1
    SAVED_LEVEL=$LEVEL


    into:


    # Operate in destination directory
    cd $BACKUP_DIR
    rm -fr $TMP.*

    name_cleanup # should not do anything in normal cases
    compute_level_and_bids $1
    SAVED_LEVEL=$LEVEL

    # Run pre-backup
    echo "Running pre-backup procedure..."
    PRE_BACKUP

    # Remove old backups...
    echo
    echo "Removing old backups..."


    Then the variables NEW_BID and LEVEL will be defined in your pre-backup script and contain the BID and level of the new backup.

    Gundolf
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.