From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39775 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: Archiving large NNML groups quickly. Date: Tue, 30 Oct 2001 14:37:11 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175432 29727 80.91.224.250 (21 Oct 2002 04:43:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:43:52 +0000 (UTC) Return-Path: Original-Received: (qmail 28937 invoked from network); 30 Oct 2001 22:42:28 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 30 Oct 2001 22:42:28 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 15yhZR-00040z-00; Tue, 30 Oct 2001 16:41:21 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 30 Oct 2001 16:40:58 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA11817 for ; Tue, 30 Oct 2001 16:40:47 -0600 (CST) Original-Received: (qmail 28900 invoked by alias); 30 Oct 2001 22:40:55 -0000 Original-Received: (qmail 28895 invoked from network); 30 Oct 2001 22:40:55 -0000 Original-Received: from smtp.newsguy.com (HELO newsguy.com) (209.155.56.71) by gnus.org with SMTP; 30 Oct 2001 22:40:55 -0000 Original-Received: from reader.local.lan (66.51.210.228.dslextreme.com [66.51.210.228] (may be forged)) by newsguy.com (8.9.1a/8.9.1) with ESMTP id OAA89308 for ; Tue, 30 Oct 2001 14:40:26 -0800 (PST) Original-Received: (from reader@localhost) by reader.local.lan (8.11.6/8.11.6) id f9UMeNb08818; Tue, 30 Oct 2001 14:40:23 -0800 X-Authentication-Warning: reader.local.lan: reader set sender to reader@newsguy.com using -f Original-To: ding@gnus.org In-Reply-To: (Simon Josefsson's message of "Tue, 30 Oct 2001 10:23:05 +0100 (CET)") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 Original-Lines: 109 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39775 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39775 Simon Josefsson 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 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 - 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 < require an argument (Note: do not include path with GROUP) -d - display most of the variables inside this script. -s - Show what the results would be -w - 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^