Go to file
bmen 3f73b69b36 „README.md“ ändern 2019-09-24 18:04:33 +00:00
LICENSE Initial commit 2019-09-23 07:36:52 +00:00
README.md „README.md“ ändern 2019-09-24 18:04:33 +00:00

README.md

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

# Push
rsync --progress -e 'ssh -p23' --recursive <Lokales Verzeichnis> <Benutzername>@<Benutzername>.your-storagebox.de:<Ziel Verzeichnis>
# Pull
rsync --progress -e 'ssh -p23' --recursive <Benutzername>@<Benutzername>.your-storagebox.de:<Verzeichnis> <Lokales Verzeichnis>
# Als Bash-Skript lieber im verbose statt mit progress
rsync --delete -e 'ssh -p23' --recursive <Benutzername>@<Benutzername>.your-storagebox.de:<Verzeichnis> <Lokales Verzeichnis>

https://wiki.hetzner.de/index.php/Storage_Boxes

  • --progress = Alle Dateien und deren Datentransfer anzeigen
  • --delete = Alle Dateien beim Ziel löschen, wenn sie bei der Quelle auch nicht mehr vorhanden sind
  • --recursive = Alle Unterverzeichnisse mit einbeziehen
  • -v = Versbose-Mode
  • -e = alternatives Protokoll bspw. -e 'ssh'

https://linuxconcept.com/rsync-example-for-system-administrator/

Cronjob

QNAP

Do NOT edit crontab the usual way! crontab -e

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

When you're done, reload the crontab file and restart the cron daemon:

crontab /etc/config/crontab && /etc/init.d/crond.sh restart

https://wiki.qnap.com/wiki/Add_items_to_crontab

Gute Quellen