Re: [BackupPC-users] BackupPC Working Well - Except Archiving
2008-11-21 10:02:49
samk-01 AT ntlworld DOT com wrote at about 13:49:38 +0000 on Friday, November
21, 2008:
> 02 I would like to conduct actions prior and post creating an archive.
> Specifically mounting a Truecrypt encrypted removable disk. The following
> command line works exactly as required when executed at the command line as
> user = backuppc but fails when used in archiveHost.pl.
> Command line version
> /bin/echo password | /usr/bin/truecrypt --text --keyfiles=""
> --protect-hidden=no --password=password --mount /dev/sdd1
> /media/backups-archived
>
Config. pl says:
Note: all Cmds are executed directly without a shell, so the
prog name
# needs to be a full path and you can't include shell syntax
like
# redirection and pipes; put that in a script if you need it.
So you could right a script instead.
Alternatively, what I do is let the command be:
bash -c "<my bash script"
with proper use of quoting and escaping you can put as long and
complicated of a bash script as you want (but the escaping can get
hairy if you go down a couple of levels).
try something like:
bash -c "/bin/echo password | /usr/bin/truecrypt --text --keyfiles=''
--protect-hidden=no --password=password --mount /dev/sdd1 /media\
/backups-archived"
Note: I changed " to ' -- to avoid having to escape the "
(alternatively you could have used single quotes around the entire line.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|