From: Roman Mamedov <rm@romanrm.ru>
To: Dave <dave@thekilempire.com>
Cc: Anand Jain <Anand.Jain@oracle.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: snapshot ctime // Re: [RFC] btrfs auto snapshot
Date: Wed, 17 Aug 2011 21:13:16 +0600 [thread overview]
Message-ID: <20110817211316.0414bb5a@natsu> (raw)
In-Reply-To: <20110817140433.GA32261@hendrix.borisch.local>
[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]
On Wed, 17 Aug 2011 10:04:33 -0400
Dave <dave@thekilempire.com> wrote:
> I've already done something similar. I take hourly, daily, weekly, and monthly
> snapshots of my /home subvolume. Here's the script I've created for this:
On one machine I make hourly snapshots of my /home and of the root FS as well.
The tricky part is actually not the snapshotting, but the deletion of outdated snapshots.
That's due to the unfortunate fact (bug?), that snapshot-directories do not have their ctime set correctly at all, they have some totally bogus ctime instead.
.........../snaps/$ ls -la --time=ctime | tail
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-05@02-31-51
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-06@02-49-29
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-07@00-17-40
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-08@01-53-29
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-10@03-09-32
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-12@00-26-54
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-13@01-40-19
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-14@04-22-07
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-15@02-29-13
dr-xr-xr-x 1 root root 102 2011-06-28 12:29 2011-08-16@10-27-57
As you can see I have to store creation date/time in the snapshot name, and then parse it out to delete snapshots e.g. older than 3 months.
So until someone cares about snapshot ctime enough to fix this, btrfs will not be a convenient FS to work with timed snapshotting/cleanup.
--
With respect,
Roman
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-08-17 15:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-17 2:15 [RFC] btrfs auto snapshot Anand Jain
2011-08-17 9:24 ` Anand Jain
2011-08-17 13:23 ` David Pottage
2011-08-18 10:11 ` Anand Jain
2011-08-17 19:56 ` Lenz Grimmer
2011-08-17 13:31 ` Matthias G. Eckermann
2011-08-18 10:07 ` Anand Jain
2011-08-17 14:04 ` Dave
2011-08-17 14:50 ` Ken A
2011-08-17 17:38 ` Matthias G. Eckermann
2011-08-17 21:56 ` Matthias G. Eckermann
2012-02-23 9:54 ` Fajar A. Nugraha
2012-03-01 13:48 ` Arvin Schnell
2012-03-01 14:13 ` Fajar A. Nugraha
2011-08-17 15:13 ` Roman Mamedov [this message]
2011-08-17 15:56 ` snapshot ctime // " Jérôme Poulin
2011-08-18 10:14 ` Anand Jain
2012-02-23 10:37 ` Hubert Kario
2012-02-23 12:02 ` Anand Jain
2012-02-23 12:13 ` Fajar A. Nugraha
2012-02-23 14:09 ` Matthias G. Eckermann
2012-02-23 13:24 ` Hubert Kario
2012-02-24 6:05 ` Anand Jain
2012-02-24 5:59 ` Fahrzin Hemmati
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110817211316.0414bb5a@natsu \
--to=rm@romanrm.ru \
--cc=Anand.Jain@oracle.com \
--cc=dave@thekilempire.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).