rdiff-backup include-globbing-filelist error

Discussion in 'Installation/Configuration' started by Lotek, Jun 4, 2008.

  1. Lotek

    Lotek New Member

    So now I've got everything else setup perfectly right, BUT now I can't get rdiff-backup to work with my external hard drive. At first it was because I was using a directory with data in it already, but now it seems that it doesn't want to read my include file. Here's my script that I've been working with:
    Code:
    #!/bin/bash
    
    #---------------------------------------#
    
    ## Script Variables ##
    
    # Backup Device #
    MOUNT_POINT="/media/backup"
    
    # Sources to backup #
    SOURCES="--include-globbing-filelist /home/user/scripts/include_file"
    
    # Target Directory #
    # exclude trailing slash #
    TARGET="/media/backup/rdiff_backup"
    
    # Exclude File #
    EXCLUDE_FILE="/home/user/scripts/exclude_file.txt"
    
    # Extras #
    
    # When did the script last run
    HISTORY_LOG="/home/user/scripts/Backup_History.txt"
    
    # See what packages are installed
    DPKG_LIST="/home/user/scripts/dpkg-filelist"
    
    #-------------------------------------------------#
    ## Verify Device and Sources ##
    echo " Starting backup..."
    
    # -x returns true if the file exists and is executable.
    
    if [ ! -x $TARGET ]; then
            echo " Backup target does not exist or you don't have permission!"
            echo " Exiting..."
            exit 2
    fi
            echo " Verifying Sources..."
                    for source in $SOURCES; do
            echo " Checking $source..."
                    if [ ! -x $source ]; then
            echo " Error with $source!"
            echo " Directory either does not exist, or you do not have proper permissions."
                    exit 2
            fi
            done
    
    # -f returns true if the file exists and is a regular file.
            if [ -f $EXCLUDE_FILE ]; then
            EXCLUDE="--exclude-globbing-filelist $EXCLUDE_FILE"
            fi
    
    ## Actual Backup ##
    echo " Sources verified. Running rdiff-backup..."
    echo " "
    echo " This may take a while..."
    echo " "
    echo " May I suggest a nice cup of coffee "
    echo " while you are waiting?"
    echo " "
    
            sudo rdiff-backup -v5 --print-statistics --remove-older-than 4w $EXCLUDE $SOURCES $TARGET
    
    ## Script Extras ##
    
    # Log of when I last ran the script
    # and a list of every package installed
    # on my computer.
            date +'%F_%H:%M' >> $HISTORY_LOG
            dpkg -l | awk '(print $2)' > $DPKG_LIST
    
    ## Disc Information ##
    
    # How much space do I have left?
    echo " "
    echo " Displaying Drive Information:"
            df -h
    echo " "
    
    exit 0
    
    Alright... So that throws me an error no matter what I change... ok, so then I tried to run it straight from the command line with this:

    Code:
    sudo rdiff-backup -v5 --print-statistics --include-globbing-filelist ./include_file / /media/backup/rdiff_backup
    
    But that gives me this error message:
    Code:
    Reading globbing filelist ./include_file
    Fatal Error: Last selection expression:
        Command-line include glob: /root/ispconfig
    only specifies that files be included.  Because the default is to
    include all files, the expression is redundant.  Exiting because this
    probably isn't what you meant.
    
    So I took out the /root/ispconfig, but then it throws the same error for my next directory name. Here is my include file:

    Code:
    /home
    /etc/shadow
    /etc/passwd
    /etc/group
    /var/www
    /var/lib/named
    /var/named
    /root/ispconfig
    
    I'm lost in the sauce. I have no clue what is going on here and it's frustrating. So what Iam I doing wrong? I know it's probably something stupid. Oh! All of my files are edited with nano using the -w option because I just never got comfortable with vi. I can use it, but I'm not fluent with it. Regardless. Any help would be appreciated!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Code:
    sudo rdiff-backup -v5 --print-statistics --include-globbing-filelist ./include_file [B][COLOR="Red"]/[/COLOR][/B] /media/backup/rdiff_backup
    I think you're trying to back up everything (/), therefore there's no need to include files/directories because they are included anyway.
     

Share This Page