rsync between desktop & external hdd.

Matt McCutchen hashproduct+rsync at
Tue Sep 4 01:11:48 GMT 2007

On 9/3/07, shirish <shirishag75 at> wrote:
> 1. take an image of my /home/shirish the first time (without the
> .something files) all the remaining files and just do one way
> synchronization (whatever is on the hdd gets reflected on the external
> storage)

If your external drive is mounted at /media/backup-disk , your command
might look like this:

rsync -a --exclude='/.*' --del /home/shirish/ /media/backup-disk/backup1/

The -a stands for archive mode, which makes the destination match the
source in almost all respects.  It includes the seven options
-rltpogD, for which grsync has individual checkboxes; see the man page
for the details of what each optionn does.  You'll probably be fine
with -a, but you may wish to go through and see which subset of
-rltpogD you care about.

The --exclude='/.*' makes rsync skip dotfiles immediately inside
/home/shirish .  The --del makes rsync delete files from the
destination that no longer exist in the source.  The trailing slash on
/home/shirish/ is important so that rsync copies it onto, not into,
/media/backup-disk/backup1 .

> 2. A folder on another machine which has one directory (again one way
> synchornization) .

The command will be similar but with a different source and destination.

>   In reality I'm gonna go with Grsync as the solution at the end
> (which is the UI slapped on top of rsync) but before I trust Grsync I
> need to how this works.

You might find Grsync's Simulate button (equivalent to the -n,
--dry-run option) helpful.  It also shows the rsync command resulting
from your Grsync options for comparison to the one I wrote above.

> I also read quite a bit of documentation on the net where they talk
> about using rsync & cron to do the job but still nobody does explain
> what the flags do & why I need those flags.

You would use cron if you want backups to be made automatically on a
schedule.  If you arrive at an rsync command line you like, you can
enter it as a cron job.

If you want to keep multiple backups from different points in the
past, you could use a tool such as rsnapshot ( ) to manage them.


More information about the rsync mailing list