All pastes #373065 Raw Edit

Stuff

public text v1 · immutable
#373065 ·published 2007-02-26 14:59 UTC
rendered paste body
echo "---------- Backup Script Running... ----------"

if test `date +%A` = "Sunday" && ! -e "/mnt/snap/WebServer/WebSite_Backup/$directoryname"; then

    # if it is sunday and you havent yet done a full backup, do so
    echo "Performing Weekly Full Backup..."
    fullbackup;

elif test ! -e /mnt/snap/WebServer/WebSite_Backup/$current/*full.tar.gz; then

    # if there is no current fullbackup, make one
    echo "No Current Full Backup - Performing Full Backup Now..."
    fullbackup;

else

    # otherwise, do an incremental backup
    echo "Performing Incremental Backup..."
    incrementalbackup;

fi # end if statement

echo "---------- Backup Script Done ----------"