staging.inyokaproject.org

Backup Rotating Script

Status: Ungelöst | Ubuntu-Version: Ubuntu 16.04 (Xenial Xerus)
Antworten |

TRIOLOG

Anmeldungsdatum:
15. April 2020

Beiträge: 1

Hallo zusammen, ich weiß nicht ob das hier richtig ist, falls nicht bitte verschieben.

Ich nutze ein Backup Rotating Script welches ein Vollbackup macht und danach Inkrementele Backups. Allerdings führt das Script neuerdings nur noch Vollbackups aus auf einer neu formatierten NTFS Festplatte die per USB angeschlossen ist.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#rotating backup script - v1.0
#!/bin/bash
mount /dev/sdb1 /mnt/backup
if [ $? -ne 0 ] ; then
   echo "/root/bin/rsync.log" | mail -s "mount - Modus die Datensicherung ist gescheitert" x@mail.com
  exit 1
 fi

rm -rf "/mnt/backup/sicherung.6"
mv -f "/mnt/backup/sicherung.5" "/mnt/backup/sicherung.6" 
mv -f "/mnt/backup/sicherung.4" "/mnt/backup/sicherung.5"
mv -f "/mnt/backup/sicherung.3" "/mnt/backup/sicherung.4"
mv -f "/mnt/backup/sicherung.2" "/mnt/backup/sicherung.3"
mv -f "/mnt/backup/sicherung.1" "/mnt/backup/sicherung.2"
mv -f "/mnt/backup/sicherung.0" "/mnt/backup/sicherung.1"
time /usr/bin/rsync --exclude ._* --rsync-path=/usr/bin/rsync --stats --log-file=/root/bin/backup.log -vaup --link-dest="/mnt/backup/sicherung.1/" "/srv/fileserver" "/mnt/backup/sicherung.0/" > /root/bin/rsync.log

if [ $? != "0" ]
 then
    echo "/root/bin/rsync.log" | mail -s "Modus die Datensicherung ist gescheitert" x@mail.com 
else
   echo "/root/bin/rsync.log" | mail -s "Modus die Datensicherung war erfolgreich" x@mail.com
 fi
 sleep 300 
umount /mnt/backup

Könnt ihr mir da helfen? Auf einer weiteren Festplatte funktioniert das Script allerdings einwandfrei.

Moderiert von sebix:

Thema in einen noch besser passenden Forenbereich verschoben.

dingsbums

Anmeldungsdatum:
13. November 2010

Beiträge: 3793

Du könntest den rsync-Parameter --modify-window=X (X in Sekunden) ausprobieren. Siehe rsync-Manpage:

--modify-window
When comparing two timestamps, rsync treats the timestamps as being equal if they differ by no more than the modify-window value.
This is normally 0 (for an exact match), but you may find it useful to set this to a larger value in some situations.
In particular, when transferring to or from an MS Windows FAT filesystem (which represents times with a 2-second resolution),
 --modify-window=1 is useful (allowing times to differ by up to 1 second).

NTFS ist zwar kein FAT, aber vielleicht hilft es ja.

Oder formatiere die Partition mit ext4. Wenn es damit auch auftritt, liegt es wahrscheinlich am USB-Controllerchip im externen Gehäuse.

Antworten |