Gnus development mailing list
 help / color / mirror / Atom feed
* Archiving large NNML groups quickly.
@ 2001-10-30  0:05 Daniel Pittman
  2001-10-30  1:49 ` Harry Putnam
  2001-10-30  9:23 ` Simon Josefsson
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Pittman @ 2001-10-30  0:05 UTC (permalink / raw)


Now that the NNML marks, et al, are set up so that NNML groups are
independent, is it possible for me to quickly move my current
linux-kernel archive to a backup by doing...

] cd ~/Mail && mv linux.kernel linux.kernel.1

...when Gnus is not running? I think this should just work and I will
get a new group linux.kernel.1 and all, but I wanted to check...

        Daniel

-- 
I'm in favor of legalizing drugs. According to my values system, if people
want to kill themselves, they have every right to do so. Most of the harm that
comes from drugs is because they are illegal.
        -- Milton Friedman



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

* Re: Archiving large NNML groups quickly.
  2001-10-30  0:05 Archiving large NNML groups quickly Daniel Pittman
@ 2001-10-30  1:49 ` Harry Putnam
  2001-10-30  9:23 ` Simon Josefsson
  1 sibling, 0 replies; 10+ messages in thread
From: Harry Putnam @ 2001-10-30  1:49 UTC (permalink / raw)


Daniel Pittman <daniel@rimspace.net> writes:

> Now that the NNML marks, et al, are set up so that NNML groups are
> independent, is it possible for me to quickly move my current
> linux-kernel archive to a backup by doing...
>
> ] cd ~/Mail && mv linux.kernel linux.kernel.1
>
> ...when Gnus is not running? I think this should just work and I will
> get a new group linux.kernel.1 and all, but I wanted to check...

After moving:
I think you will have to add it to ~/Mail/active by hand.

Once thats done you can press "^" in group buffer <RET> on nnml server
and subscribe to it.  I think the nov file will be fine without
nnml-generate-nov-databases-1 <RET> ~/Mail/kernel.1 <RET>



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

* Re: Archiving large NNML groups quickly.
  2001-10-30  0:05 Archiving large NNML groups quickly Daniel Pittman
  2001-10-30  1:49 ` Harry Putnam
@ 2001-10-30  9:23 ` Simon Josefsson
  2001-10-30  9:44   ` Kai Großjohann
  2001-10-30 22:37   ` Harry Putnam
  1 sibling, 2 replies; 10+ messages in thread
From: Simon Josefsson @ 2001-10-30  9:23 UTC (permalink / raw)
  Cc: ding

On Tue, 30 Oct 2001, Daniel Pittman wrote:

> Now that the NNML marks, et al, are set up so that NNML groups are
> independent, is it possible for me to quickly move my current
> linux-kernel archive to a backup by doing...
> 
> ] cd ~/Mail && mv linux.kernel linux.kernel.1
> 
> ...when Gnus is not running? I think this should just work and I will
> get a new group linux.kernel.1 and all, but I wanted to check...

You need to unsubscribe to the old group, and subscribe to the new one
within Gnus, but other than that I think it would work.  Hm, I think nnml
notices new groups automagically if they are part of the active file,
maybe you can use "echo linux.kernel.1 0 1 0 y >> active" to do everything
from the cmd line.  IMHO the active file should be eliminated, and a
".active" file in each nnml group should be used instead.




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

* Re: Archiving large NNML groups quickly.
  2001-10-30  9:23 ` Simon Josefsson
@ 2001-10-30  9:44   ` Kai Großjohann
  2001-10-30 11:54     ` Simon Josefsson
  2001-10-30 22:37   ` Harry Putnam
  1 sibling, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2001-10-30  9:44 UTC (permalink / raw)
  Cc: Daniel Pittman, ding

Simon Josefsson <jas@extundo.com> writes:

> IMHO the active file should be eliminated, and a ".active" file in
> each nnml group should be used instead.

This means that Gnus has to recursively search ~/Mail, at least if
long file names are not in effect.  This could be quite slow.

But having Gnus rely on the active file being correct is not good, of
course.  What can be done?

kai
-- 
Lisp is kinda like tpircstsoP



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

* Re: Archiving large NNML groups quickly.
  2001-10-30  9:44   ` Kai Großjohann
@ 2001-10-30 11:54     ` Simon Josefsson
  2001-10-30 12:50       ` Kai Großjohann
  2001-10-30 15:58       ` Matt Armstrong
  0 siblings, 2 replies; 10+ messages in thread
From: Simon Josefsson @ 2001-10-30 11:54 UTC (permalink / raw)
  Cc: Daniel Pittman, ding

On Tue, 30 Oct 2001, Kai Großjohann wrote:

> Simon Josefsson <jas@extundo.com> writes:
> 
> > IMHO the active file should be eliminated, and a ".active" file in
> > each nnml group should be used instead.
> 
> This means that Gnus has to recursively search ~/Mail, at least if
> long file names are not in effect.  This could be quite slow.

No recursive searching is needed, I think, just use the subscribed group
name in Gnus to find the filename.  Of course, instead of reading only 1
file (active) you need to read N files, but it is only necessary to do it
once and after that keep things in memory -- right now the active file is
often read from disk.  So in the end, it would probably be about the same
speed.  When listing all groups, a recursive find is needed though.

Or maybe the active file should simply be removed completely (not replaced
by .active), the active info could be kept in .newsrc.eld (.marks)  
instead.  If we change the format of .marks it would even be simple to
manipulate it from shell/perl scripts.  Hm, what do you think?





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

* Re: Archiving large NNML groups quickly.
  2001-10-30 11:54     ` Simon Josefsson
@ 2001-10-30 12:50       ` Kai Großjohann
  2001-10-30 13:17         ` Per Abrahamsen
  2001-10-30 15:58       ` Matt Armstrong
  1 sibling, 1 reply; 10+ messages in thread
From: Kai Großjohann @ 2001-10-30 12:50 UTC (permalink / raw)
  Cc: Daniel Pittman, ding

Simon Josefsson <jas@extundo.com> writes:

> Or maybe the active file should simply be removed completely (not replaced
> by .active), the active info could be kept in .newsrc.eld (.marks)  
> instead.  If we change the format of .marks it would even be simple to
> manipulate it from shell/perl scripts.  Hm, what do you think?

If it is not necessary to recursively search too often, then it's
fine.  In particular, avoiding recursive search on startup and on `g'
would be enough, I think.

Changing the .marks format is nice but not urgent, I guess.

kai
-- 
Lisp is kinda like tpircstsoP



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

* Re: Archiving large NNML groups quickly.
  2001-10-30 12:50       ` Kai Großjohann
@ 2001-10-30 13:17         ` Per Abrahamsen
  0 siblings, 0 replies; 10+ messages in thread
From: Per Abrahamsen @ 2001-10-30 13:17 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Changing the .marks format is nice but not urgent, I guess.

If we are going to change any (more) file formats, it should be before
5.10 is released (which I guess isn't urgent either).



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

* Re: Archiving large NNML groups quickly.
  2001-10-30 11:54     ` Simon Josefsson
  2001-10-30 12:50       ` Kai Großjohann
@ 2001-10-30 15:58       ` Matt Armstrong
  2001-11-01 15:30         ` Steinar Bang
  1 sibling, 1 reply; 10+ messages in thread
From: Matt Armstrong @ 2001-10-30 15:58 UTC (permalink / raw)
  Cc: Kai Großjohann, Daniel Pittman, ding

Simon Josefsson <jas@extundo.com> writes:

> On Tue, 30 Oct 2001, Kai Großjohann wrote:
>
>> Simon Josefsson <jas@extundo.com> writes:
>> 
>> > IMHO the active file should be eliminated, and a ".active" file in
>> > each nnml group should be used instead.
>> 
>> This means that Gnus has to recursively search ~/Mail, at least if
>> long file names are not in effect.  This could be quite slow.
>
> No recursive searching is needed, I think, just use the subscribed
> group name in Gnus to find the filename.  Of course, instead of
> reading only 1 file (active) you need to read N files, but it is
> only necessary to do it once and after that keep things in memory --
> right now the active file is often read from disk.  So in the end,
> it would probably be about the same speed.  When listing all groups,
> a recursive find is needed though.
>
> Or maybe the active file should simply be removed completely (not
> replaced by .active), the active info could be kept in .newsrc.eld
> (.marks) instead.  If we change the format of .marks it would even
> be simple to manipulate it from shell/perl scripts.  Hm, what do you
> think?

Keeping the active file out of the backend's directory tree might ease
problems generated by having nnfolder and nnml backends using the same
active file.

But my personal preference would be to see .newsrc.eld contain less,
and push more of the meta data into mostly-human-readable files like
the active and marks files.  This would require some serious effort
though.

-- 
matt




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

* Re: Archiving large NNML groups quickly.
  2001-10-30  9:23 ` Simon Josefsson
  2001-10-30  9:44   ` Kai Großjohann
@ 2001-10-30 22:37   ` Harry Putnam
  1 sibling, 0 replies; 10+ messages in thread
From: Harry Putnam @ 2001-10-30 22:37 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> On Tue, 30 Oct 2001, Daniel Pittman wrote:
>
>> Now that the NNML marks, et al, are set up so that NNML groups are
>> independent, is it possible for me to quickly move my current
>> linux-kernel archive to a backup by doing...
>> 
>> ] cd ~/Mail && mv linux.kernel linux.kernel.1
>> 
>> ...when Gnus is not running? I think this should just work and I will
>> get a new group linux.kernel.1 and all, but I wanted to check...
>
> You need to unsubscribe to the old group, and subscribe to the new one
> within Gnus, but other than that I think it would work.  Hm, I think nnml
> notices new groups automagically if they are part of the active file,
> maybe you can use "echo linux.kernel.1 0 1 0 y >> active" to do everything
> from the cmd line.  IMHO the active file should be eliminated, and a
> ".active" file in each nnml group should be used instead.

I've experimented with this a little and this looks like at least one
good way to do it from command line ( a helper tool is included).

1)
   cp -R ~/Mail/target ~/Mail/target.1
2) 
   Get the highest and lowest message numbers in "target.1 and add this entry
   to ~/Mail/active: "target.1 high_num low_num y
   (A homeboy scritp included to extract that information)

3) 
   Two techniques available here  
   a. In a running gnus go to server buffer. Press <RET> on
   nnml (or whatever) server.  Subscribe to target.1
4)
   Back in group buffer press `g' before entering the new group
NOTE:
This method seems to maintain any marks that were in "target".

Helper script:
For usage type "add_active help" but in general:
add_active -d <no args> - display most of the variables inside the script
add_active -s GROUP - Shows what will be appended.
add_active -w GROUP - Write the data to ~/Mial/active
(Note: -w flag causes a backup copy of ~/Mail/active to be
 written to ~/Mail/active_MNTHDAYHOURMINSEC before writing)

(NOTE: Beware of lightly tested script)

cat add_active

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#!/bin/sh
# Keywords: add_active - insert an entry into Gnus ~/Mail/active file
# key Date: Oct 30 2001 2
# &&

## BEGIN DOCUMENTATION[S] ======================================
usage () {
cat >&2 <<EOM
Purpose:  Append entry to Gnus ~/Mail/active file containing
          highest and lowest messagge number like: "GROUP HI LO y"

Usage:  \`$(basename $0) -[dsw] GROUP <-s -w> require an argument
         (Note: do not include path with GROUP)
       -d - <no args allowed> display most of the variables inside
            this script.
       -s - <requires a GROUP arg> Show what the results would be
       -w - <requires a GROUP arg> Writes to active file. 
            (Note: -w flag cause a copy of ~/Mail/active to be saved
             to ~/Mail/active_$(date +"%m%d%H%M%S") before writing.
EOM
} ## end

## BEGIN SAFEGAURDS ============================================
if [ -z "$1" -o "$1" = help ];then
    usage
    exit
fi
## BEGIN VARIABLE[s] ============================================
AWK=/bin/awk
GROUP=$2
ACTIVE=~/Mail/active
BASE=/home/reader/Mail

ACT_ENTRY=$(ls $BASE/$GROUP |sort -n| $AWK '
	NR<2{ORS=" ";last=$0}END {$FNR;print;print last " y"}')

## BEGIN GETOPTS SECTION =========================================
while getopts "ds:w:" opt; do
       case "$opt" in
## Display variables
    d) 
       $AWK '/[[:alnum:]]+=/' $0
        ;;
## show results
    s) echo -e "$GROUP $ACT_ENTRY"
       echo "Type \`$(basename $0) -w GROUP' to write it'"
       ;;
## Write results
    w) 
       cp $ACTIVE "$ACTIVE"_$(date +"%m%d%H%M%S") &&      
       echo "$GROUP $ACT_ENTRY" >> $ACTIVE 
       echo -e ""$GROUP $ACT_ENTRY" written to $ACTIVE"
       ;;
  esac
done

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



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

* Re: Archiving large NNML groups quickly.
  2001-10-30 15:58       ` Matt Armstrong
@ 2001-11-01 15:30         ` Steinar Bang
  0 siblings, 0 replies; 10+ messages in thread
From: Steinar Bang @ 2001-11-01 15:30 UTC (permalink / raw)


>>>>> "Matt Armstrong" <matt+dated+1007049498.cdc3aa@lickey.com>:

[snip!]
> But my personal preference would be to see .newsrc.eld contain less,

I _very_ much agree!





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

end of thread, other threads:[~2001-11-01 15:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-30  0:05 Archiving large NNML groups quickly Daniel Pittman
2001-10-30  1:49 ` Harry Putnam
2001-10-30  9:23 ` Simon Josefsson
2001-10-30  9:44   ` Kai Großjohann
2001-10-30 11:54     ` Simon Josefsson
2001-10-30 12:50       ` Kai Großjohann
2001-10-30 13:17         ` Per Abrahamsen
2001-10-30 15:58       ` Matt Armstrong
2001-11-01 15:30         ` Steinar Bang
2001-10-30 22:37   ` Harry Putnam

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