Hallo,
ich benutze rsync zum Backuppen meines Notebooks.
Die Intention dieses Backups ist primär einem Festplattendefekt / -verlust die Brisanz zu nehmen.
Das Backup mache ich folgendermaßen:
Code:
DEST="defect"
# User that rsync will connect as
# Are you sure that you want to run as root, though?
USER="daten"
# Directory to copy from on the source machine.
BACKDIR="dir1 dir2 dir3"
# Directory to copy to on the destination machine.
DESTDIR="/storage/backups/notebook/"
# excludes file - Contains wildcard patterns of files to exclude.
# i.e., *~, *.bak, etc. One "pattern" per line.
# You must create this file.
EXCLUDES=
OPTS="-v -a -x -H --delete --rsh=ssh --exclude-from=$EXCLUDES --stats --progress"
# Only run rsync if $DEST responds.
VAR=`ping -s 1 -c 1 $DEST > /dev/null; echo $?`
if [ $VAR -eq 0 ]; then
rsync $OPTS $BACKDIR $USER@$DEST:$DESTDIR
else
echo "Cannot connect to $DEST."
fi
Wenn ich jedoch jetzt etwas (versehentlich) lösche oder ändere, das Backup mache, wird $file/$dir auch im Backup gelöscht/geändert.
Gibt es die Möglichkeit eine Art Versionierung zu nutzen mit rsync?
z.B. dir1/foobar ändert sich, ich mache ein Backup, und möchte auch danach noch auf die N-te vorherige Version der Datei vor dem/den Backup(s) zugreifen können.
Ist sowas möglich und wenn ja wie?
Vielen Dank im voraus - nicht allzunervige Weihnachten u.s.w.
d@ten
Lesezeichen