Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment Re:Multiple answers (Score 1) 266

Heres mine, in bash/sh. use by creating an rsync include/exclude file named as fqdn.rsync, then run rsync_backup.sh fqdn.rsync. GPLV2

#!/bin/sh

PROG="$( basename $0 )"
VER=20101022001

run_backup() {
        HOST="$1"
        EXCLUDE_FILE="$2"
        BACKUP_DIR="$3"

        DATE="$( date +%Y%m%d_%H%M%S )"

        rm -rf -- "$BACKUP_DIR/$HOST/tmp/"

        mkdir -p -- "$BACKUP_DIR/$HOST/tmp/" &&

        rsync -avhSPW --stats -e ssh --delete --delete-excluded -b \
                --compress-level=9 \
                --link-dest="$BACKUP_DIR/$HOST/cur/" \
                --exclude-from="$EXCLUDE_FILE" "$HOST:/" "$BACKUP_DIR/$HOST/tmp/" 2>&1 | tee "$BACKUP_DIR/$HOST/$DATE.log" &&

        echo "Commiting new backup..." &&

        mv -v -- "$BACKUP_DIR/$HOST/tmp/" "$BACKUP_DIR/$HOST/$DATE/" &&

        echo "Setting backup as current..." &&

        ln -sfnv -- "$DATE" "$BACKUP_DIR/$HOST/cur" &&

        return 0

        echo "Error encountered!"

        mv -v "$BACKUP_DIR/$HOST/$DATE.log" "$BACKUP_DIR/$HOST/$DATE.err"
        return 1

}

if [ "$1" = "-chkupd" ]; then
        chkupd.sh $0
        exit $?
fi

while [ -n "$1" ]; do
        FILE="$1"

        echo "Reading config file '$FILE'"

        echo "$FILE" | grep '[.]rsync$' > /dev/null 2>&1

        if [ $? = 0 ]; then

                HOST="$( basename "$FILE" )"
                HOST="${HOST/%.rsync/}"

                if [ "${FILE:1:1}" != "/" ]; then
                        FILE="$( pwd )/$FILE"
                fi

                BACKUP_DIR="$( dirname $FILE)"

                echo "Backing up from host '$HOST' to '$BACKUP_DIR/$HOST/' ($FILE)"

                chkhost.sh "$HOST" 22

                if [ $? -eq 0 ]; then
                        run_backup $HOST $FILE $BACKUP_DIR
                fi

                echo

        fi

        shift
done

Comment Re:Partial Reinforcement (Score 1) 268

Any psych-turned-CS person will tell you that the hardest behaviors to break are partial reinforcement.

Behaviors that don't pay off all the time, but sometimes do.

Anyone who has saved hours of time by pulling out an obscure manual from the bottom of a pile, or recovered data with the help of a rare connector type from the junk closet, is getting partially reinforced.

And therefore, will continue to collect.

...and maybe that is because it is a valid behaviour?

Comment Re:Four Horsemen burger of San Antonio, TX (Score 3, Informative) 267

Considering that Pepper spray is considered a chemical weapon and is banned under the Chemical Weapons Convention (which India signed & ratified). I'd assume that this would fall under the same ban.

http://en.wikipedia.org/wiki/Pepper_spray
http://en.wikipedia.org/wiki/Chemical_Weapons_Convention

Comment Re:Epic Fail? (Score 4, Insightful) 90

If that is the case then we have already failed. Any number of bacteria could have survived on the rovers could now be contaminating the surface. With no known competition they could be flourishing. I see little that can be done to figure out what is now native bacteria (if any) and what was brought via the rovers.

Wow! Too bad the NASA/ESA scientists weren't as smart as you, because if they were they would have put policies in place to mitigate the risks of contamination.

Comment Re:Unison; and maybe git in the future. (Score 1) 421

If there is a conflict on two files with the same name but different case, it will refuse to sync that file; but it will sync all other files that don't have an error.

Error: Two or more files on a case-sensitive system have names identical except for case. They cannot be synchronized to a case-insensitive file system.

Thus leaving it up to the user to manually handle the situation. I have never encountered a situation on a case-sensistive FS where I would want two files named with the same sequence of letters, but differing case. To me it would just be confusing.

Slashdot Top Deals

A memorandum is written not to inform the reader, but to protect the writer. -- Dean Acheson

Working...