snapshot ctime // Re: [RFC] btrfs auto snapshot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 17 Aug 2011 10:04:33 -0400
Dave <dave@xxxxxxxxxxxxxxxx> 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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux