Version 3.6 von Michael Ecer am 2021/09/03 11:35

Zeige letzte Bearbeiter
1 = (% style="color:#000000" %)bk1 und bk2(%%) =
2
3 === (% style="color:#000000" %)Das Einrichten der Backup Platten (aus der Dokumentation)(%%) ===
4
5 (% style="color:#000000" %)Festplatten anzeigen lassen und Backupfestplatte ausfindig machen
6
7 {{code language="bash"}}
8 fdisk -l
9 {{/code}}
10
11 (% style="color:#000000" %) Ausgabe an diesem Beispiel: (/dev/sdb ist hier die Festplatte, die nicht partitioniert ist)
12
13 {{code language="bash"}}
14 Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
15 Units: sectors of 1 * 512 = 512 bytes
16 Sector size (logical/physical): 512 bytes / 512 bytes
17 I/O size (minimum/optimal): 512 bytes / 512 bytes
18 Disklabel type: dos
19 Disk identifier: 0xcccd1553
20
21 Device Boot Start End Sectors Size Id Type
22 /dev/sda1 2048 2099199 2097152 1G fd Linux raid autodetect
23 /dev/sda2 2099200 35653631 33554432 16G fd Linux raid autodetect
24 /dev/sda3 35653632 1953525167 1917871536 914.5G fd Linux raid autodetect
25
26
27 Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
28 Units: sectors of 1 * 512 = 512 bytes
29 Sector size (logical/physical): 512 bytes / 512 bytes
30 I/O size (minimum/optimal): 512 bytes / 512 bytes
31 Disklabel type: dos
32 Disk identifier: 0xd4aba4f1
33
34
35 Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
36 Units: sectors of 1 * 512 = 512 bytes
37 Sector size (logical/physical): 512 bytes / 512 bytes
38 I/O size (minimum/optimal): 512 bytes / 512 bytes
39 Disklabel type: dos
40 Disk identifier: 0x27cd6ce3
41
42 Device Boot Start End Sectors Size Id Type
43 /dev/sdc1 2048 2099199 2097152 1G fd Linux raid autodetect
44 /dev/sdc2 2099200 35653631 33554432 16G fd Linux raid autodetect
45 /dev/sdc3 35653632 1953525167 1917871536 914.5G fd Linux raid autodetect
46 {{/code}}
47
48 (% style="color:#000000" %)Erstellen einer Partition über die gesamte Festplatte
49
50 {{code language="bash"}}
51 fdisk /dev/sdb
52 {{/code}}
53
54 (% style="color:#000000" %)Erklärung und Reihenfolge der einzugebenen Paramter:
55
56 {{code language="bash"}}
57 n (new partition)
58 p (primary partition)
59 1 (number of partition)
60 (first bit)
61 (last bit)
62 t (set type)
63 83 (choose type 83 = Linux)
64 w (write to disk)
65 {{/code}}
66
67 (% style="color:#000000" %) Formatieren der Partition mit dem Dateisystem EXT3 und vergeben das Label bk1 oder bk2 (in Berlin standardmäßig immer bk1, weil es gibt nur eine Backupfestplatte)
68
69 {{code language="bash"}}
70 mkfs.ext4 -L bk1 /dev/sdb1
71 {{/code}}
72
73 (% style="color:#000000" %) Anpassen der EXT3 Dateisystem Parameter für die Partition
74
75 {{code language="bash"}}
76 tune2fs -i0 -c0 /dev/sdb1
77 {{/code}}
78
79 (% style="color:#000000" %)Backuppartition ausmounten, da nur Leserechte
80
81 {{code language="bash"}}
82 umount /backup/bk1
83 {{/code}}
84
85 (% style="color:#000000" %)Backuppartition manuell einmounten, um Schreibrechte zu erlangen
86
87 {{code language="bash"}}
88 mount -L bk1 /backup/bk1
89 {{/code}}
90
91 (% style="color:#000000" %)Ordner "snapshot" auf der Backupfestplatte erstellen
92
93 {{code language="bash"}}
94 mkdir /backup/bk1/snapshot
95 {{/code}}
96
97 (% style="color:#000000" %)Backuppartition ausmounten
98
99 {{code language="bash"}}
100 umount /backup/bk1
101 {{/code}}
102
103 (% style="color:#000000" %) screen erstellen
104
105 {{code language="bash"}}
106 screen
107 {{/code}}
108
109 (% style="color:#000000" %) Erstellen Sie einen manuellen Snapshot daily_bk1 oder daily_bk2 (optional)
110
111 (% style="color:#000000" %) ldsnapshot [ daily_bk1 | daily_bk2 ]
112
113
114 {{code language="bash"}}
115 ldsnapshot daily_bk1
116 {{/code}}
117
118 === (% style="color:#000000" %)Format:(%%) ===
119
120 (% style="color:#000000" %) Ext4 -> aufgrund des Journaling, dadurch wird die Dateiüberprüfung beschleunigt.
121
122 === (% style="color:#000000" %)Label:(%%) ===
123
124 (% style="color:#c0392b" %)**Das Label der internen Backup-Platten muss lauten: "bk1" oder/und "bk2" falls Sie eine externe USB Festplatte als Backup Medium einrichten möchten, so muss diese das Label LD-USB-BAK erhalten. **
125
126 === (% style="color:#000000" %)Aufbau:(%%) ===
127
128 (% style="color:#000000" %)Sollte eine Festplatte in logoDIDACT eines dieser Label verwenden, so wird sie vom System für regelmäßige Backups genutzt.
129 \\Das Backupscript ist standartmäßig so eingestellt (in '/etc/cron.d/backup') das es
130
131 {{code language="bash"}}
132 Montag "Dienstag" Mittwoch "Donnerstag" Freitag um 0.22 ldsnapshot für BK1 ausführt und
133
134 "Montag" Dienstag "Mittwoch" Donnerstag "Freitag" um 0.22 ldsnapshot für BK2 ausführt.
135 {{/code}}
136
137 (% style="color:#000000" %) Sollte BK1 oder BK2 nicht vorhanden sein wird die jeweils vorhandene Backup-Platte, für die Sicherung genutzt.
138
139 (% style="color:#000000" %)Es ist nicht unbedingt nötig, dass nur interne Festplatten das Label bekommen dürfen. Es kann auch eine externe USB-Festplatte mit diesem Label ausgestattet sein, nur muss die Platte dann um 0.22 am Server hängen um ein Update durchzuführen.