mfssnapshots(1)

πŸ“¦
version 4.59.2 Β· 5 versions
, in arch rolling, nixos 26.05, nixpkgs unstable, ubuntu stonking

✨ mfssnapshots πŸ’… β€” MooseFS snapshot tools πŸŽ€

okay bestie, pull up a chair, we're doing snapshots today and honestly? it's giving magic πŸͺ„. this is part of MooseFS, and it's literally one page covering three little tools that all work together. no cap.


🌸 SYNOPSIS 🌸

mfsappendchunks [-?] [-s FROM:TO] SNAPSHOT_FILE FILE...

mfsmakesnapshot [-?] [-o|-c|-p] SOURCE_OBJECT... DESTINATION

mfsrmsnapshot [-?] [-f] OBJECT...

πŸ’– DESCRIPTION πŸ’–

so there's three of them, and they're a whole trio. let me introduce you 🫢

mfsappendchunks β€” this one is the equivalent of mfssnapshot from MooseFS 1.5, iconic honestly. what it does is append a lazy copy of the specified FILE(s) onto the specified SNAPSHOT_FILE. now when I say "lazy", bestie, I don't mean it in a bad way 😭 β€” "lazy" here means that creation of new chunks is delayed to the moment one copy is modified. so it just chills and waits. if SNAPSHOT_FILE does not exist, it is created. if you hand it multiple files, they get merged into one target file in such a way that each file begins at chunk (64MB) boundary; padding space is left empty. optionally only a slice of chunks can be appended (that's option -s, we'll get there). a slice definition is similar to Python: FROM is included, TO excluded, and negative numbers mean backwards from the end. if FROM or TO is not specified then it means from the beginning or to the end of file respectively. see examples below πŸ‘‡

mfsmakesnapshot β€” okay this one makes a "real" snapshot (it's a lazy copy, same as with mfsappendchunks) of some object(s) or subtree, similarly to the cp -r command. and here's the slay part: it's atomic with respect to each SOURCE_OBJECT argument separately. a whole vibe. πŸ‘‘

a few things you need to know, so listen up:

  • if DESTINATION points to an already existing file, an error will be reported β€” unless you pass the -o (overwrite) option.
  • if destination points to an already existing directory, the snapshot is created inside this directory.
  • note: if SOURCE_OBJECT is a directory, it is copied as a whole; but if it's followed by a trailing slash, only directory content is copied. sneaky little detail, iykyk ✨
  • when the -c option is given then attributes of newly created files are more similar to those created by ordinary cp (so: without attribute preserving).
  • option -p preserves hardlinks in SOURCE β€” meaning when two or more objects inside SOURCE are hardlinked to each other, then in the DESTINATION folder those objects will be hardlinked to each other as well. the friendship is preserved. πŸ«‚

mfsrmsnapshot β€” the cleanup queen 🧹. this one removes objects created as a result of mfsmakesnapshot, similarly to rm -r, but much faster. for safety reasons, objects created via mfsmakesnapshot have the snapshot attribute set (see mfseattr(1)) and only such objects can be removed using the mfsrmsnapshot command. protective, and honestly? valid.

by default, all files and directories inside the specified directory must have this attribute set for the command to remove the whole directory; otherwise the command will not remove anything. like, nothing at all. zero. πŸ’€

this behavior can be overridden by the -f option. with this option, mfsrmsnapshot will remove only those files/directories that have the snapshot attribute set and will leave everything else untouched. very careful, very demure.


πŸ¦‹ SLICES πŸ¦‹

FROM:TO for a source file with chunks 0,1,2,...,N-1,N:

2:4 = chunks 2 and 3

3: = chunks 3,4,...,N

:5 = chunks 0,1,2,3,4

:-1 = chunks 0,1,2,3,...,N-1

-4:-2 = chunks N-3,N-2

ikr? Python-coded of them. πŸπŸ’…


🌈 OPTIONS 🌈

short and sweet section, but here it is:

  • -? β€” displays short usage message.
bestie, heads up: the other flags (-s, -o, -c, -p, -f) were already explained up in the DESCRIPTION section, so scroll back up if you skipped them πŸ™ˆ

😭 REPORTING BUGS 😭

found something cursed? report bugs to <bugs@moosefs.com>. they wanna hear it, fr fr.


Copyright (C) 2026 Jakub Kruszona-Zawadzki, Saglabs SA

This file is part of MooseFS.

MooseFS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (only).

MooseFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/>.

the legal girlies are serious about this one, so don't skip it πŸ’œ

⭐ SEE ALSO ⭐


and that's the whole page, bestie!! πŸŽ€βœ¨ go make some snapshots. this was MooseFS 4.59.2-1, from May 2026, and it was absolutely iconic of you to read the whole thing. periodt. πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from