9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] vac flattens trees?
@ 2009-03-09 13:35 Anthony Sorace
  2009-03-09 14:55 ` roger peppe
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Anthony Sorace @ 2009-03-09 13:35 UTC (permalink / raw)
  To: 9fans

given a list of files like "/fish /dog /snake/asp /snake/python", the
results of a vac (as interpreted by vacfs) seem to be "/fish /dog /asp
/python". is this intentional? it seems unexpected, and makes doing
selective backups using vac a bit awkward.

this is vac on p9p and vacfs on plan9, if that matters.



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

* Re: [9fans] vac flattens trees?
  2009-03-09 13:35 [9fans] vac flattens trees? Anthony Sorace
@ 2009-03-09 14:55 ` roger peppe
  2009-03-09 15:11   ` erik quanstrom
  2009-03-09 16:08 ` Russ Cox
  2009-03-09 20:55 ` Latchesar Ionkov
  2 siblings, 1 reply; 14+ messages in thread
From: roger peppe @ 2009-03-09 14:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/3/9 Anthony Sorace <anothy@gmail.com>:
> given a list of files like "/fish /dog /snake/asp /snake/python", the
> results of a vac (as interpreted by vacfs) seem to be "/fish /dog /asp
> /python". is this intentional? it seems unexpected, and makes doing
> selective backups using vac a bit awkward.

i suppose your preferred behaviour would be
for it to do a treewise merge of the paths and
vac the shallowest root that contains all the
paths, missing out all contents that aren't
under one of the named paths.

this seems like quite an involved operation,
when you can get much the same result
by building a custom namespace containing the
trees you want (admittedly, a recursive mntgen
would be useful here).



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

* Re: [9fans] vac flattens trees?
  2009-03-09 14:55 ` roger peppe
@ 2009-03-09 15:11   ` erik quanstrom
  0 siblings, 0 replies; 14+ messages in thread
From: erik quanstrom @ 2009-03-09 15:11 UTC (permalink / raw)
  To: 9fans

> i suppose your preferred behaviour would be
> for it to do a treewise merge of the paths and
> vac the shallowest root that contains all the
> paths, missing out all contents that aren't
> under one of the named paths.
>
> this seems like quite an involved operation,
> when you can get much the same result
> by building a custom namespace containing the
> trees you want (admittedly, a recursive mntgen
> would be useful here).

wouldn't work on p9p.

it's hard to comment on the current behavior without
knowing the reasoning.  given your use case, it seems
like tar's model makes more sense.

a straightforward solution would be to have vac take
a proto.  i would think the -e flag would not scale.
then you can give a single root and include only the
stuff you want without changing current behavior.
and the bonus is that it works a lot like mkfs.

- erik



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

* Re: [9fans] vac flattens trees?
  2009-03-09 13:35 [9fans] vac flattens trees? Anthony Sorace
  2009-03-09 14:55 ` roger peppe
@ 2009-03-09 16:08 ` Russ Cox
  2009-03-09 16:43   ` roger peppe
  2009-03-09 20:55 ` Latchesar Ionkov
  2 siblings, 1 reply; 14+ messages in thread
From: Russ Cox @ 2009-03-09 16:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Mar 9, 2009 at 6:35 AM, Anthony Sorace <anothy@gmail.com> wrote:
> given a list of files like "/fish /dog /snake/asp /snake/python", the
> results of a vac (as interpreted by vacfs) seem to be "/fish /dog /asp
> /python". is this intentional? it seems unexpected, and makes doing
> selective backups using vac a bit awkward.

it is intentional, so that you can say
    vac /long/path/to/usr/rsc
and get a vac with just "rsc" in the top level.

if you want selective backups you
can use the -x flag.

russ


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

* Re: [9fans] vac flattens trees?
  2009-03-09 16:08 ` Russ Cox
@ 2009-03-09 16:43   ` roger peppe
  2009-03-09 19:01     ` Russ Cox
  0 siblings, 1 reply; 14+ messages in thread
From: roger peppe @ 2009-03-09 16:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/3/9 Russ Cox <rsc@swtch.com>:
> if you want selective backups you
> can use the -x flag.

presumably you mean the -e flag?



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

* Re: [9fans] vac flattens trees?
  2009-03-09 16:43   ` roger peppe
@ 2009-03-09 19:01     ` Russ Cox
  2009-03-09 19:11       ` roger peppe
  0 siblings, 1 reply; 14+ messages in thread
From: Russ Cox @ 2009-03-09 19:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Mar 9, 2009 at 8:43 AM, roger peppe <rogpeppe@gmail.com> wrote:
> 2009/3/9 Russ Cox <rsc@swtch.com>:
>> if you want selective backups you
>> can use the -x flag.
>
> presumably you mean the -e flag?

i meant the -x flag (he said he was on p9p).

http://swtch.com/plan9port/man/man1/vac.html

russ


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

* Re: [9fans] vac flattens trees?
  2009-03-09 19:01     ` Russ Cox
@ 2009-03-09 19:11       ` roger peppe
  2009-03-09 19:34         ` Jeff Sickel
  0 siblings, 1 reply; 14+ messages in thread
From: roger peppe @ 2009-03-09 19:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/3/9 Russ Cox <rsc@swtch.com>:
> On Mon, Mar 9, 2009 at 8:43 AM, roger peppe <rogpeppe@gmail.com> wrote:
>> 2009/3/9 Russ Cox <rsc@swtch.com>:
>>> if you want selective backups you
>>> can use the -x flag.
>>
>> presumably you mean the -e flag?
>
> i meant the -x flag (he said he was on p9p).
>
> http://swtch.com/plan9port/man/man1/vac.html

ah. that's new since i downloaded my p9p copy. my apologies.



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

* Re: [9fans] vac flattens trees?
  2009-03-09 19:11       ` roger peppe
@ 2009-03-09 19:34         ` Jeff Sickel
  0 siblings, 0 replies; 14+ messages in thread
From: Jeff Sickel @ 2009-03-09 19:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

The beauty of distributed source control...

Sync Early, Sync Often
http://www.selenic.com/mercurial/wiki/index.cgi/SyncEarlySyncOften


I like that more attention is being paid to the various ways of
using vac on p9p.  Maybe a sign of more papers for this year's
IWP9?

-jas

On Mar 9, 2009, at 2:11 PM, roger peppe wrote:

>
> ah. that's new since i downloaded my p9p copy. my apologies.
>




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

* Re: [9fans] vac flattens trees?
  2009-03-09 13:35 [9fans] vac flattens trees? Anthony Sorace
  2009-03-09 14:55 ` roger peppe
  2009-03-09 16:08 ` Russ Cox
@ 2009-03-09 20:55 ` Latchesar Ionkov
  2009-03-10  3:29   ` Anthony Sorace
  2 siblings, 1 reply; 14+ messages in thread
From: Latchesar Ionkov @ 2009-03-09 20:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

You can vac the directories separately and then use vac -m to create
an archive that looks any way you want.

On Mon, Mar 9, 2009 at 7:35 AM, Anthony Sorace <anothy@gmail.com> wrote:
> given a list of files like "/fish /dog /snake/asp /snake/python", the
> results of a vac (as interpreted by vacfs) seem to be "/fish /dog /asp
> /python". is this intentional? it seems unexpected, and makes doing
> selective backups using vac a bit awkward.
>
> this is vac on p9p and vacfs on plan9, if that matters.
>
>



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

* Re: [9fans] vac flattens trees?
  2009-03-09 20:55 ` Latchesar Ionkov
@ 2009-03-10  3:29   ` Anthony Sorace
  2009-03-10  3:39     ` erik quanstrom
  2009-03-10  3:43     ` Russ Cox
  0 siblings, 2 replies; 14+ messages in thread
From: Anthony Sorace @ 2009-03-10  3:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

that seems a little awkward. erik's suggestion is what i
think i'd really like. rog's would be okay, although still
somewhatawkward, were i on plan 9; since i'm not, i think
i have russ's option. so with -x, say i had a tree:

/dog
/cat
/fish/guppie
/fish/clown
/pig

and i wanted /dog, /cat, and /fish/clown. would three
includes be sufficent there, or do i need it include /fish and
then exclude /fish/guppie, to get the heirarchy?

i do wish more tools used proto. the format is so nice.



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

* Re: [9fans] vac flattens trees?
  2009-03-10  3:29   ` Anthony Sorace
@ 2009-03-10  3:39     ` erik quanstrom
  2009-03-10  3:53       ` john
  2009-03-10  3:43     ` Russ Cox
  1 sibling, 1 reply; 14+ messages in thread
From: erik quanstrom @ 2009-03-10  3:39 UTC (permalink / raw)
  To: 9fans

On Mon Mar  9 23:30:22 EDT 2009, anothy@gmail.com wrote:
> that seems a little awkward. erik's suggestion is what i
> think i'd really like. rog's would be okay, although still
> somewhatawkward, were i on plan 9; since i'm not, i think
> i have russ's option. so with -x, say i had a tree:
>
> /dog
> /cat
> /fish/guppie
> /fish/clown
> /pig
>
> and i wanted /dog, /cat, and /fish/clown. would three
> includes be sufficent there, or do i need it include /fish and
> then exclude /fish/guppie, to get the heirarchy?
>
> i do wish more tools used proto. the format is so nice.

oh, you already know what i'm going to suggest, so
just get to it!

russ: i don't think in understand your motivating case.  if
you want to flatten /some/long/path/target to just target,
why can't you just cd there?  there must be some other part
i haven't gotten yet.

- erik



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

* Re: [9fans] vac flattens trees?
  2009-03-10  3:29   ` Anthony Sorace
  2009-03-10  3:39     ` erik quanstrom
@ 2009-03-10  3:43     ` Russ Cox
  1 sibling, 0 replies; 14+ messages in thread
From: Russ Cox @ 2009-03-10  3:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

i think

include fish/clown
exclude fish/*

and then vac fish dog pig
would be fine.
i haven't tried this,
but i know there are
some vac users who
use -x quite a bit.

russ


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

* Re: [9fans] vac flattens trees?
  2009-03-10  3:39     ` erik quanstrom
@ 2009-03-10  3:53       ` john
  2009-03-10  3:55         ` erik quanstrom
  0 siblings, 1 reply; 14+ messages in thread
From: john @ 2009-03-10  3:53 UTC (permalink / raw)
  To: 9fans

Erik Quanstrom wrote:
> On Mon Mar  9 23:30:22 EDT 2009, anothy@gmail.com wrote:
>> that seems a little awkward. erik's suggestion is what i
>> think i'd really like. rog's would be okay, although still
>> somewhatawkward, were i on plan 9; since i'm not, i think
>> i have russ's option. so with -x, say i had a tree:
>>
>> /dog
>> /cat
>> /fish/guppie
>> /fish/clown
>> /pig
>>
>> and i wanted /dog, /cat, and /fish/clown. would three
>> includes be sufficent there, or do i need it include /fish and
>> then exclude /fish/guppie, to get the heirarchy?
>>
>> i do wish more tools used proto. the format is so nice.
>
> oh, you already know what i'm going to suggest, so
> just get to it!
>

kenfs? ;)


John




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

* Re: [9fans] vac flattens trees?
  2009-03-10  3:53       ` john
@ 2009-03-10  3:55         ` erik quanstrom
  0 siblings, 0 replies; 14+ messages in thread
From: erik quanstrom @ 2009-03-10  3:55 UTC (permalink / raw)
  To: 9fans

> > oh, you already know what i'm going to suggest, so
> > just get to it!
> >
>
> kenfs? ;)

no kenfs is just sun, wed, fri, sat.  monday is nupas day.
(five minutes left!)  and tuesday i suggest atazz.  i try to
lay low on thursday.

- erik



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

end of thread, other threads:[~2009-03-10  3:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 13:35 [9fans] vac flattens trees? Anthony Sorace
2009-03-09 14:55 ` roger peppe
2009-03-09 15:11   ` erik quanstrom
2009-03-09 16:08 ` Russ Cox
2009-03-09 16:43   ` roger peppe
2009-03-09 19:01     ` Russ Cox
2009-03-09 19:11       ` roger peppe
2009-03-09 19:34         ` Jeff Sickel
2009-03-09 20:55 ` Latchesar Ionkov
2009-03-10  3:29   ` Anthony Sorace
2009-03-10  3:39     ` erik quanstrom
2009-03-10  3:53       ` john
2009-03-10  3:55         ` erik quanstrom
2009-03-10  3:43     ` Russ Cox

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