[tahoe-dev] [tahoe-lafs] #835: "tahoe cp -r --mutable": make mutable copy of immutable directories, vice versa
tahoe-lafs
trac at allmydata.org
Thu Nov 19 20:02:57 PST 2009
#835: "tahoe cp -r --mutable": make mutable copy of immutable directories, vice
versa
-------------------------------+--------------------------------------------
Reporter: warner | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: undecided
Component: code-frontend-cli | Version: 1.5.0
Keywords: | Launchpad_bug:
-------------------------------+--------------------------------------------
Now that we have immutable directories (#607), we could use some CLI
commands to take advantage of them. #828 is about having "tahoe backup"
create immutable directories, but what if you want to convert those
immutable directories into a form that you can modify again? {{{tahoe
cp}}} seems like the most appropriate tool.
There are a couple of interesting forms of copying that could be done. (In
each case, we're talking about directories, and not files.)
* original is immutable: make immutable copy (re-use same object)
* original is immutable: make mutable copy
* original is mutable: make mutable copy
* original is mutable: make immutable copy
The default for {{{cp -r}}} should be to use the same type of object:
mutable-to-mutable or immutable-to-immutable (and of course, immutable-to-
immutable means we just re-use the original dircap).
I think that {{{tahoe cp}}} should acquire a {{{--mutable}}} flag which
tells it to always create mutable directories, even if the original was
immutable. This would be used to convert your "tahoe backup" -created
immutable directories into a form that you can modify.
Likewise, I think it should have a {{{--immutable}}} flag which tells it
to always create immutable directories.
I think that files should be handled differently: basically the default
should be mutable-to-mutable and immutable-gets-shared. If you copy with
{{{--immutable}}}, then clearly that will trigger mutable-to-immutable
(since immutable dirnodes are deep-immutable, so we can't fill them with
mutable files). But if you copy with {{{--mutable}}}, I think we should
create mutable dirnodes with immutable files. A separate flag (maybe
{{{--mutable-files}}}) could be used if you really do want to turn all of
your immutable files into mutable ones.
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/835>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list