rsync a Quick Introduction

A great tool to mirror directories

JD P

Algoloma Systems

My Knowledge About Rsync

Directory Mirrors

 rsync -avz source_directory target_directory 

On the same machine, it doesn't do file differencing by default.

This impacts expected performance.

Simple Example



 rsync -avz /etc/ /backups/romulus/etc 

Trailing Slashes



Trailing Slashes are critical

Use a slash to avoid confusion

Local Mirror Example

 

#!/bin/sh

EXCLUDES=/var/www/rsync_excludes

OPTS="-v -u -a --delete --links --recursive --stats --progress --exclude-from=$EXCLUDES "

BACKDIR="/var/www"

TARGET="/backups/romulus/"

mkdir -p ${TARGET}

rsync ${OPTS} ${BACKDIR} ${TARGET} 

Remote Mirror Example


TARGET="userid@server:/backups"

rsync ${OPTS} ${BACKDIR} ${TARGET} 

Rsync Backup Checklist

Rsync Uses

Learn More

Questions?



Questions?



Please send feedback!
Thank you.
[any material that should appear in print but not on the slide]