Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Ausgabe von rsync
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Tue May 28, 2013 9:48 am    Post subject: [solved] Ausgabe von rsync Reply with quote

Ich habe ein kleines Problem mit der Ausgabe von rsync im inneren eines Scripts und vermutlich weiß einer von euch Rat.

Das ist der Befehl der im Script ausgeführt wird:
Code:
rsync -a --delete --link-dest=/das/alte/backup --stats /quelle/des/backup /ziel/des/backup | mail -s "INFO" meine@email.adresse

Wenn bestimmte Dateien nicht kopiert werden konnten dann verteilt sich die Ausgabe in die Shell und das E-Mail. Die Liste der Dateien die nicht kopiert werden konnten landet in der Shell und die Statistik im E-Mail und eigentlich hätte ich gerne beides im E-Mail nur wie?
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW


Last edited by schmidicom on Tue May 28, 2013 10:26 am; edited 1 time in total
Back to top
View user's profile Send private message
doedel
Guru
Guru


Joined: 05 Feb 2006
Posts: 579
Location: Denmark

PostPosted: Tue May 28, 2013 10:03 am    Post subject: Reply with quote

Das liegt an stderr stdout usw. Error geht im normalfall an einer Umleitung/Pipe vorbei auf die Konsole. Das hat was mit >2&1 oder was das war zu tun, genaueres zur Syntax kann ich dir leider nicht sagen.

Evtl gibts ja rsync-Optionen, die das logging/die Ausgabe beeinflussen...
_________________
1 ha == 1 Hekto-Ar == 1 Hektar
Back to top
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Tue May 28, 2013 10:20 am    Post subject: Reply with quote

Danke doedel,
da hätte ich eigentlich auch selbst drauf kommen müssen aber vermutlich werde ich alt. ;)

Dann müsste es so ja klappen:
Code:
rsync -a --delete --link-dest=/das/alte/backup --stats /quelle/des/backup /ziel/des/backup 2>&1 | mail -s "INFO" meine@email.adresse

Ich werde dass mal so in mein Script basteln und hoffen es klappt.
_________________
Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum