Date: Sat, 05 Jan 2013 16:12:56 -0200 From: schultz@ime.usp.br To: freebsd-questions@freebsd.org Subject: Backup with mtree and rsync? Message-ID: <20130105161256.49797e7viwwtqfc8@webmail.ime.usp.br>
next in thread | raw e-mail | index | archive | help
I have been wondering whether it is possible to create a backup system using mtree and rsync. Essentially, the user would create a mtree specification of the source directory and copy it over to the destination directory with rsync. Any changes in the destination could then be detected before restoring with the mtree specification, which should contain strong hashes of the files and should not contain the nlink keyword. The problem is that mtree would be too slow. It would recompute the hashes of big files even when they did not change from the last backup. Therefore, I would like to ask if there is an easy way to accomplish the following. Let a mtree specification of a directory from a certain point in the past be given. Also, assume that a (regular) file below that directory has not changed if its current modification time (mtime) equals its modification time in the past specification. Produce as output the new mtree specification for the directory without reading these files. This is somewhat like rsync does to perform incremental backups. P.S.: As an aside, is there an utility in the base system that can reproduce the behavior of `rsync --delete -a dir0/ dir1/`?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130105161256.49797e7viwwtqfc8>