From owner-freebsd-questions@FreeBSD.ORG Tue Jan 8 18:40:14 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 60AFE577 for ; Tue, 8 Jan 2013 18:40:14 +0000 (UTC) (envelope-from ciprian.craciun@gmail.com) Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 005682EF for ; Tue, 8 Jan 2013 18:40:13 +0000 (UTC) Received: by mail-ea0-f182.google.com with SMTP id a14so310855eaa.27 for ; Tue, 08 Jan 2013 10:40:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=+vtDzjGllp+3jflAb1IwWEMd4FZk1Dk0enOlAN30pHM=; b=x/NBrhI+tjf5d2+7LSeet9dUYKDjjKtc6esWcpEqi4TaRhvYqmibZzRuNhGac8PGgs afHmZxtdDi7Vti9D54ZOgNQAMUkjA+AR2OuHwy+Tf/0Pu9gYaUM6Wh6l2e/C10qFszK5 eGfiYr+L0G96iqnHSyWNIp0g75Cp70OpXJ+67tsde7bz1s9fvTD+6NsG7siYGkcet1kk ax9KvmplysNq8FEtVcB5ZVMvxlxU3gDcRcNgHXp3boPvk7WqhPYJDrvCnjmv1vHBqcwm GDqIuS3twJ8yXUGhOgFK7SnM+ZITlSItV85SpKPI1ZfgbIcRsgU8xCI0syep+Wb/Qxqi lpTQ== Received: by 10.14.213.134 with SMTP id a6mr176028069eep.45.1357670407255; Tue, 08 Jan 2013 10:40:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.129.202 with HTTP; Tue, 8 Jan 2013 10:39:37 -0800 (PST) In-Reply-To: <20130105161256.49797e7viwwtqfc8@webmail.ime.usp.br> References: <20130105161256.49797e7viwwtqfc8@webmail.ime.usp.br> From: Ciprian Dorin Craciun Date: Tue, 8 Jan 2013 20:39:37 +0200 Message-ID: Subject: Re: Backup with mtree and rsync? To: schultz@ime.usp.br Content-Type: text/plain; charset=UTF-8 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2013 18:40:14 -0000 On Sat, Jan 5, 2013 at 8:12 PM, wrote: > 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. A little bit off-topic, but there is a small tool that does something similar to your suggested `mtree` usage, but specifically tailored for backups, `rdup`: http://miek.nl/projects/rdup Although I've not used it myself (I use `rdiff-backup` and on Linux), the idea is pretty similar with what you want to achieve: * you run `rdup` with an old "descriptor file" plus a target path, and in turn it generates: * a new "descriptor file"; * a list of files that should be backed up; * you then decide what you do with the list of files to be backed-up (i.e. put them in a `tar`, `rysnc` them to a server, etc.); Hope it helps, Ciprian.