Initial Commit
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2021-10-13 19:25:16 +02:00
commit fed26c8bbd
66 changed files with 9016 additions and 0 deletions

70
solutions/07-backups.md Normal file
View File

@ -0,0 +1,70 @@
## Aufgabe 1a
Datum Wochentag Backup-Methode Band
2020-11-02 Mon Ink Sohn-1
2020-11-03 Tue Ink Sohn-2
2020-11-04 Wed Ink Sohn-3
2020-11-05 Thur Ink Sohn-4
2020-11-06 Fri Diff Vater-1
2020-11-09 Mon Ink Sohn-1
2020-11-10 Tue Ink Sohn-2
2020-11-11 Wed Ink Sohn-3
2020-11-12 Thur Ink Sohn-4
2020-11-13 Fri Diff Vater-2
2020-11-16 Mon Ink Sohn-1
2020-11-17 Tue Ink Sohn-2
2020-11-18 Wed Ink Sohn-3
2020-11-19 Thur Ink Sohn-4
2020-11-20 Fri Diff Vater-3
2020-11-23 Mon Ink Sohn-1
2020-11-24 Tue Ink Sohn-2
2020-11-25 Wed Ink Sohn-3
2020-11-26 Thur Ink Sohn-4
2020-11-27 Fri Diff Vater-4
## Aufgabe 1b
Datum Wochentag Backup-Methode Band
2020-11-07 Fri Diff Vater-1
2020-11-14 Fri Diff Vater-2
2020-11-21 Fri Diff Vater-3
2020-11-28 Fri Diff Vater-4
2020-11-30 Mon Voll Großvater-1
2020-12-04 Fri Diff Vater-1
2020-12-11 Fri Diff Vater-2
2020-12-18 Fri Diff Vater-3
2020-12-25 Fri Diff Vater-4
2020-12-31 Thur Voll Großvater-2
2021-01-01 Fri Diff Vater-1
2021-01-08 Fri Diff Vater-2
2021-01-15 Fri Diff Vater-3
2021-01-22 Fri Diff Vater-4
2021-01-29 Fri Voll Großvater-3
## Praxisaufgabe
### Teilaufgabe A
Drei Monate, zwei Wochen und einen Tag zurück vom 6. November 2020.
```bash
$ date --date '2020-11-06 - 3 month - 2 week - 1 day' '+%A, %d %B %Y'
Montag, 22 Juli 2020
```
Benötigte Backups
Großvater-Backup 07. August 2020
### Teilaufgabe B
28.10.2020
Benötigte Backups
Großvater-Backup 02. Oktober 2020
Vater-Backup 09. 16. und 23. Oktober 2020
Sohn-Backup 26. 27. und 28. Oktober 2020

38
solutions/overlayfs.sh Normal file
View File

@ -0,0 +1,38 @@
#!/bin/bash
# 7a
mkdir --parent /root/workspace/overlayfs
cd /root/workspace/overlayfs
# 7b1
mkdir --parent ./lower_0/usr/bin
touch ./lower_0/usr/bin/mybin
# 7b2
mkdir --parent ./lower_1/etc/mybin
touch ./lower_1/etc/mybin/config.json
# 7b3
mkdir --parent ./lower_2/var/log/mybin
touch ./lower_2/var/log/mybin/info.log
# 7b4
mkdir --parent ./lower_3/usr/lib/systemd/system
touch ./lower_3/usr/lib/systemd/system/mybin.service
# 7b5
mkdir --parent ./lower_4/etc/mybin/conf.d/
touch ./lower_4/etc/mybin/conf.d/sqlite.config
# 7b6
mkdir --parent ./lower_5/etc/mybin/conf.d/
touch ./lower_4/etc/mybin/conf.d/postgresql.config
# 7c
mkdir --parent ./upper_application ./upper_application_plugins
mkdir --parent ./workdir_application ./workdir_application_plugins
mkdir --parent ./application ./application_plugins
mount -t overlay -o lowerdir=$(pwd)/lower_0:$(pwd)/lower_1:/$(pwd)/lower_2:/$(pwd)/lower_3,upperdir=$(pwd)/upper_application,workdir=$(pwd)/workdir_application overlayfs $(pwd)/application
mount -t overlay -o lowerdir=$(pwd)/lower_0:$(pwd)/lower_1:/$(pwd)/lower_2:/$(pwd)/lower_3:/$(pwd)/lower_4:/$(pwd)/lower_5,upperdir=$(pwd)/upper_application_plugins,workdir=$(pwd)/workdir_application_plugins overlayfs $(pwd)/application_plugins