Backup: Unterschied zwischen den Versionen
Aus MeinWiki
(Die Seite wurde neu angelegt: „== Rdiff Backup == === Script === #!/bin/bash logPath1=/var/log/backup/ logFile1=backup$(date "+%y%m%d").log fileWrite1=$logPath1$logFile1 mount -t cifs…“) |
(→Script) |
||
Zeile 22: | Zeile 22: | ||
echo $(date "+%y%m%d-%H%M%S")' Error Backup' >> $fileWrite1 | echo $(date "+%y%m%d-%H%M%S")' Error Backup' >> $fileWrite1 | ||
logger "Fehler externes Backup" | logger "Fehler externes Backup" | ||
− | fi | + | fi |
Version vom 25. September 2015, 07:59 Uhr
Rdiff Backup
Script
#!/bin/bash logPath1=/var/log/backup/ logFile1=backup$(date "+%y%m%d").log fileWrite1=$logPath1$logFile1 mount -t cifs -o username=admin,password=backup4AlbateC //172.30.4.12/backup /mnt/backup if [ -f /mnt/backup/mount ]; then echo $(date "+%y%m%d-%H%M%S")' Start Backup' >> $fileWrite1 rdiff-backup --exclude-symbolic-links /mnt/daten1/bereich/ /mnt/backup/daten1/bereich/ >> $fileWrite1 rdiff-backup --exclude-symbolic-links /mnt/daten1/home/ /mnt/backup/daten1/home >> $fileWrite1 rdiff-backup --exclude-symbolic-links /mnt/daten1/profile /mnt/backup/daten1/profile >> $fileWrite1 rdiff-backup --exclude-symbolic-links /mnt/daten1/exchange /mnt/backup/daten1/exchange >> $fileWrite1 /etc/init.d/postgresql stop rdiff-backup --exclude-symbolic-links /var/lib/postgresql/9.3/main /mnt/backup/var >> $fileWrite1 /etc/init.d/postgresql start logger "Externes Backup Erfolgreich" echo $(date "+%y%m%d-%H%M%S")' Stop Backup' >> $fileWrite1 else echo $(date "+%y%m%d-%H%M%S")' Error Backup' >> $fileWrite1 logger "Fehler externes Backup" fi