On Wed, 17 Oct 2007, jdd wrote:-
>Hello :-)
>I have several folders to backup to an external server (on the web)
>through ssh.
>I use a script with 4 rsync lines
>of course ot asks me 4 times the pass.
>I don't want to have a permanent open ssh from my computer to the
>server (no pass phrase nor rsa key).
>I only would like to have to key the password once :-)
You didn't have a peek at the rsync man page did you?
>is there a way to collect the four folders in a single ssh/rsync
>session? (they are pair of local folder->remote folder)?
<Snippet location="from man rsync , Advanced usage">
ADVANCED USAGE
The syntax for requesting multiple files from a remote host
involves using
quoted spaces in the SRC. Some examples:
rsync host::'modname/dir1/file1 modname/dir2/file2' /dest
This would copy file1 and file2 into /dest from an rsync daemon.
Each addiâ
tional arg must include the same "modname/" prefix as the first one, and
must be
preceded by a single space. All other spaces are assumed to be a part
of the
filenames.
rsync -av host:'dir1/file1 dir2/file2' /dest
</snippet>
While it mentions files, it works just as well with directories if you
pass the -a or -r option:
[EMAIL PROTECTED]:~> rsync -a [EMAIL
PROTECTED]:'/media/backups/backups/RPMS-10.3 /media/backups/backups/RPMS-10.2'
temp/ --stats
Number of files: 977
Number of files transferred: 950
Total file size: 384331054 bytes
Total transferred file size: 384331044 bytes
Literal data: 384331044 bytes
Matched data: 0 bytes
File list size: 38956
Total bytes sent: 19016
Total bytes received: 384456848
sent 19016 bytes received 384456848 bytes 8838525.61 bytes/sec
total size is 384331054 speedup is 1.00
[EMAIL PROTECTED]:~> pushd temp ; find | wc -l ; popd
~/temp ~
978
~
[EMAIL PROTECTED]:~> pushd temp ; find | head -10 ; popd
~/temp ~
.
./RPMS-10.2
./RPMS-10.2/athlon
./RPMS-10.2/i386
./RPMS-10.2/i486
./RPMS-10.2/i586
./RPMS-10.2/i586/aircrack-ng-0.9-1.suse102.i586.rpm
./RPMS-10.2/i586/aggregate-1.6-1.suse102.i586.rpm
./RPMS-10.2/i586/alienblaster-1.1.0-2.suse102.i586.rpm
./RPMS-10.2/i586/airsnort-0.2.7e-1.suse102.i586.rpm
~
>Or is it possible to have a script ask for a pass and use it four
>times? (I'm reluctant to type the pass on the command line :-)
Not sure. However, if you're willing, you can set up ssh so you can use
passwordless logins[0] and then you won't need to keep entering it.
[0] ssh-keygen and, when asked, don't enter a password.
Regards,
David Bolt
--
Team Acorn: http://www.distributed.net/ OGR-P2 @ 100Mnodes RC5-72 @ 15Mkeys
SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit | openSUSE 10.3 32bit
SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit |
RISC OS 3.11 | RISC OS 3.6 | TOS 4.02 | openSUSE 10.3 PPC
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]