All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org>
To: Patrick Donnelly <pdonnell-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Jerry Lee <leisurelysw24-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Ceph Users <ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org>,
	Ceph Development
	<ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Revert a CephFS snapshot?
Date: Thu, 14 Nov 2019 19:48:28 +0000 (UTC)	[thread overview]
Message-ID: <alpine.DEB.2.21.1911141900360.17979@piezo.novalocal> (raw)
In-Reply-To: <CA+2bHPbw3uMLeq77XfjZfhYnYcnF-Gk+Od6UJrTiYkW+g77s4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, 14 Nov 2019, Patrick Donnelly wrote:
> On Wed, Nov 13, 2019 at 6:36 PM Jerry Lee <leisurelysw24-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > On Thu, 14 Nov 2019 at 07:07, Patrick Donnelly <pdonnell-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > >
> > > On Wed, Nov 13, 2019 at 2:30 AM Jerry Lee <leisurelysw24-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > Recently, I'm evaluating the snpahsot feature of CephFS from kernel
> > > > client and everthing works like a charm.  But, it seems that reverting
> > > > a snapshot is not available currently.  Is there some reason or
> > > > technical limitation that the feature is not provided?  Any insights
> > > > or ideas are appreciated.
> > >
> > > Please provide more information about what you tried to do (commands
> > > run) and how it surprised you.
> >
> > The thing I would like to do is to rollback a snapped directory to a
> > previous version of snapshot.  It looks like the operation can be done
> > by over-writting all the current version of files/directories from a
> > previous snapshot via cp.  But cp may take lots of time when there are
> > many files and directories in the target directory.  Is there any
> > possibility to achieve the goal much faster from the CephFS internal
> > via command like "ceph fs <cephfs_name> <dir> snap rollback
> > <snapname>" (just a example)?  Thank you!
> 
> RADOS doesn't support rollback of snapshots so it needs to be done
> manually. The best tool to do this would probably be rsync of the
> .snap directory with appropriate options including deletion of files
> that do not exist in the source (snapshot).

rsync is the best bet now, yeah.

RADOS does have a rollback operation that uses clone where it can, but 
it's a per-object operation, so something still needs to walk the 
hierarchy and roll back each file's content.  The MDS could do this more 
efficiently than rsync give what it knows about the snapped inodes 
(skipping untouched inodes or, eventually, entire subtrees) but it's a 
non-trivial amount of work to implement.

sage

  parent reply	other threads:[~2019-11-14 19:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 10:30 Revert a CephFS snapshot? Jerry Lee
     [not found] ` <CAKQB+ftphk7pepLdGEgckLtfj=KBp02cMqdea+R_NTd6Gwn-TA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-11-13 23:07   ` Patrick Donnelly
     [not found]     ` <CA+2bHPaCg4Pq-88hnvnH93QCOfgKv27gDTUjHF5rnDr6Nd2=wQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-11-14  2:36       ` Jerry Lee
     [not found]         ` <CAKQB+fvUCUAeHEHwP06auyK+ZGUHZdRzTT-38xtgsSbQDjyoHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-11-14 18:50           ` Patrick Donnelly
     [not found]             ` <CA+2bHPbw3uMLeq77XfjZfhYnYcnF-Gk+Od6UJrTiYkW+g77s4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-11-14 19:48               ` Sage Weil [this message]
     [not found]                 ` <alpine.DEB.2.21.1911141900360.17979-qHenpvqtifaMSRpgCs4c+g@public.gmane.org>
2019-12-03 15:59                   ` Robert LeBlanc
     [not found]                     ` <3f37461a0bdd94e9068526fa9a722fdf65c37fdf.camel@kernel.org>
     [not found]                       ` <3f37461a0bdd94e9068526fa9a722fdf65c37fdf.camel-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-12-03 22:07                         ` Luis Henriques

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=alpine.DEB.2.21.1911141900360.17979@piezo.novalocal \
    --to=sage-bntbu8nrog7k1umjsbkqmq@public.gmane.org \
    --cc=ceph-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org \
    --cc=leisurelysw24-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pdonnell-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.