40 lines
1.2 KiB
Markdown
40 lines
1.2 KiB
Markdown
# server-befehle
|
|
|
|
## Festplattenverbrauch ermitteln:
|
|
```
|
|
df -h
|
|
```
|
|
### du (Disk Usage)
|
|
```
|
|
du /home/
|
|
```
|
|
https://www.tecmint.com/check-linux-disk-usage-of-files-and-directories/
|
|
### ncdu (CLI-based)
|
|
```
|
|
sudo apt install ncdu
|
|
ncdu
|
|
```
|
|
|
|
## rsync
|
|
Rsync ohne Rechteübernahme (gut für gemountete Laufwerke SAMBA)
|
|
```
|
|
sudo rsync -rltv --exclude '/storage/tzm_de/var/lib/nextcloud/*' /storage/ /mnt/backup-storage/
|
|
```
|
|
### Hetzner
|
|
```
|
|
rsync --progress -e 'ssh -p23' --recursive <Lokales Verzeichnis> <Benutzername>@<Benutzername>.your-storagebox.de:<Ziel Verzeichnis>
|
|
rsync --progress -e 'ssh -p23' --recursive <Benutzername>@<Benutzername>.your-storagebox.de:<Verzeichnis> <Lokales Verzeichnis>
|
|
```
|
|
https://wiki.hetzner.de/index.php/Storage_Boxes
|
|
|
|
## Cronjob
|
|
### QNAP
|
|
Do NOT edit crontab the usual way!
|
|
However, due to the way the QNAP firmware updates crontab, it will be overwritten on the next reboot. Obviously, you want your automation to survive reboots, so edit the crontab file directly with your text editor:
|
|
```
|
|
vim /etc/config/crontab
|
|
```
|
|
|
|
## Gute Quellen
|
|
* Bash-Skripte: https://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_für_Anfänger/
|
|
* Cronjobs: https://www.stetic.com/developer/cronjob-linux-tutorial-und-crontab-syntax.html |