linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* snaprotate
@ 2017-12-02 12:53 Ulli Horlacher
  2017-12-02 13:56 ` snaprotate Ulli Horlacher
  0 siblings, 1 reply; 2+ messages in thread
From: Ulli Horlacher @ 2017-12-02 12:53 UTC (permalink / raw)
  To: linux-btrfs

Being a Netapp user for a long time, I have always missed btrfs snapshots
the way Netapp creates them.

I have now written snaprotate:

http://fex.belwue.de/snaprotate.html

snaprotate creates and manages btrfs readonly snapshots similar to Netapp.
Snapshots have names like hourly, daily, weekly, single and a date_time
prefix.

Snapshots are stored in a .snapshot/ directory in the subvolume root. 
Example: /local/home/.snapshot/2017-09-09_1200.hourly

You create a snapshot with:

snaprotate <class> <count> <subvol>

<class> is your snapshot name
<count> is the maximum number of snapshots for this class
<subvol> is the btrfs subvolume directory you want to snapshoot

If count is exceeded then the oldest snapshot will be deleted.

You can use snaprotate either as root or as normal user (for your own
subvolumes).

Example usages:

snaprotate single 3 /data             # create and rotate "single" snapshot
snaprotate test 0 /tmp                # delete all "test" snapshots
snaprotate daily 7 /home /local/share # create and rotate "daily" snapshot
snaprotate -l /home                   # list snapshots


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum TIK         
Universitaet Stuttgart         E-Mail: horlacher@tik.uni-stuttgart.de
Allmandring 30a                Tel:    ++49-711-68565868
70569 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/
REF:<20171202125356.GA1355@rus.uni-stuttgart.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-02 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-02 12:53 snaprotate Ulli Horlacher
2017-12-02 13:56 ` snaprotate Ulli Horlacher

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).