[Eisfair] Backup-Zip Argument --rsync-path funktioniert nicht
Matthias Prill
m.prill at gmx.de
So Jan 16 13:00:28 CET 2022
Am 16.01.2022 um 12:21 schrieb Marcus Röckrath:
> Hallo Matthias,
> Mal vielleicht so:
>
> echo "$tecopt"
> rsync --exclude-from=/root/backup.exclude -a --delete "$tecopt"
>
Damkit klappt es!
Testscript:
#!/bin/bash
echo Aufruf mit Parameter als Variable:
tecopt=--rsync-path="sudo rsync"
echo $tecopt
rsync --exclude-from=/root/backup.exclude -a --delete "$tecopt"
pi at 192.168.227.115:/etc/ /mnt/test/ -v
echo Aufruf mit Parameter in Zeile:
rsync --exclude-from=/root/backup.exclude -a --delete --rsync-path="sudo
rsync" pi at 192.168.227.115:/etc/ /mnt/test2/ -v
Ausgaben:
gondwana 2.8.25 # ./backup-wrapper.sh
Aufruf mit Parameter als Variable:
--rsync-path=sudo rsync
receiving incremental file list
sent 216 bytes received 58,888 bytes 10,746.18 bytes/sec
total size is 1,815,556 speedup is 30.72
Aufruf mit Parameter in Zeile:
receiving incremental file list
sent 216 bytes received 58,888 bytes 16,886.86 bytes/sec
total size is 1,815,556 speedup is 30.72
Habe das mal im BackupScript auch in Hochkomma gesetzt ($tecopt), aber
das reicht noch nicht. Da kommen noch Fehler:
Backup is running, please wait.
[--rsync: -a --delete --rsync-path="sudo rsync": unknown option
rsync error: syntax or usage error (code 1) at main.c(1762) [client=3.2.3]
- 6 Sec.]
Nun kommt es wohl auf die Schreibweise bzw. Übergabe von der Konfig in
die tecopt Variable an...
Gruß
MAtthias
Mehr Informationen über die Mailingliste Eisfair