On Mon, Mar 31, 2008 at 10:18 AM, David Brown <[EMAIL PROTECTED]> wrote:
> On Mon, Mar 31, 2008 at 09:32:06AM -0700, Brad Beyenhof wrote:
>  >So I've got a bash script (run as a cron job) that currently runs tar
>  >and redirects stdout and stderr to particular files.
>  >
>  >I'd like to run the tar command through screen so that I can check in
>  >on the process; also, the archive now spans two tapes, so using screen
>  >will hold the process so I can swap manually and respond interactively
>  >to tar's request for a new tape. To do this, I first tried just
>  >prepending screen to the existing command:
>  >
>  >/usr/bin/screen -dm tar [options] 2>{$file1} | tee {$file2}
>
>  I would either use screen's logging '-L', or "C-a H", or use something like
>  'script'.

Unfortunately, neither of those options looks like it can separate
stdout from stderr, and the former seems to have trouble with logging
to a file other than its default.

For now I'm just logging in to the server from home, initiating
"screen" myself, and running the backup script manually. Then I'm
going in to the office on the weekend to swap the tape manually,
reconnect to the detached screen, and tell tar to keep going.
Thankfully this is a short-term solution, with a new higher-capacity
unattended backup solution in the pipeline...

-- 
Brad Beyenhof                                   http://augmentedfourth.com
If they can get you asking the wrong questions, they don't have to worry
about the answers.
                                         ~ Thomas Pynchon, writer (1937- )


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to