Deleting modified files

Thomas Poindessous thomas at poindessous.com
Mon Mar 10 09:04:44 GMT 2008


On Sat, Mar 8, 2008 at 4:10 AM, Matt McCutchen <matt at mattmccutchen.net> wrote:
> On Fri, 2008-03-07 at 22:21 +0100, Thomas Poindessous wrote:
>  > I'm trying to do a backup of several servers which are almost
>  > identical. I want to have a "base" directory and one directory by
>  > server.
>  >
>  > The base directory will have only the files which are identical on all
>  > the servers, and each server directory will have all of  the other
>  > files which are not in base directory.
>
>  Do you need to be able to look at the backup and see which files are
>  identical and different, or are you just trying to save space?  In the
>  second case, it would be much easier to use a full directory for each
>  server and use --link-dest to hard-link identical corresponding files
>  among these directories.

Yes, I try to do the first solution, so I will have the possibility to
coordinate upgrade on several servers to reduce the differences.

So, do I need to use a option of rsync to list modifications and then,
rm -f files ? Or is there a quickier and easier solution ?

>  > I also have a problem with --compare-dest and --checksum because
>  > sometimes files are identical on each server but they have different
>  > modification time.
>
>  Please be more specific about what the problem is.  Do you consider
>  modification times to be significant?  If so, use -t; rsync will
>  preserve the times, and they will disqualify --compare-dest omissions
>  and --link-dest links.  If not, use --checksum and do not use -t, and
>  rsync won't deal with times at all.  (Rsync does not provide a way to
>  get the preservation without the disqualification, unless you want to
>  use multiple runs.)

Thanks a lot for this clarification, I now use --compare-dest with
--checksum and --no-t and it works great.

Thomas


More information about the rsync mailing list