Home

Linkdest

Linkdest refers to the --link-dest option in the rsync file synchronization tool. It enables the use of hard links to files from a reference directory when creating a new destination directory, enabling space-efficient incremental backups. When a file in the source directory has the same content as a corresponding file in the link-dest directory, rsync creates a hard link in the destination to the file in the link-dest instead of copying the file again.

How it works: During a transfer, rsync compares the source with the link-dest baseline. For files that

Usage: A typical invocation is rsync -a --link-dest=/path/to/previous-backup /source/ /backup/new/ . The link-dest directory should be on

Limitations and considerations: The feature relies on hard links, so both the source and link-dest (and the

are
identical
in
both
locations,
it
creates
a
hard
link
in
the
destination
to
the
existing
file
in
the
link-dest.
For
files
that
differ,
rsync
copies
the
new
version
to
the
destination
as
a
separate
inode,
so
changes
are
preserved
without
affecting
the
reference
backup.
This
mechanism
is
commonly
used
to
implement
incremental
backups
while
keeping
a
complete,
navigable
history.
the
same
filesystem
as
the
destination
to
permit
hard
links.
You
can
perform
successive
backups
by
pointing
--link-dest
to
the
most
recent
backup
each
time,
producing
a
sequence
of
backups
that
share
unchanged
data.
destination)
must
reside
on
the
same
filesystem.
It
does
not
deduplicate
across
unrelated
backups
automatically;
each
new
backup
depends
on
a
correctly
chosen
link-dest
baseline.
Permissions,
attributes,
and
symlinks
are
preserved
according
to
rsync
settings.