Posts tagged ‘Linux’

Windows Daten mit Linux Borg sichern

Ich nutze auf meiner Windows-Maschine das Windows Subsystem for Linux (WSL) und habe mal ausprobiert, wie ich Windows Daten mit WSL-Hilfe auf ein NAS sichern kann.

Nach der Installation von borg-backup und den cifs Utilities kann ich das NAS unter Linux mounten:

sudo mount -t cifs -o vers=3.0,user=uwe,password=xxxxxxxxx //192.168.0.40/Datengrab /mnt/borg/

Dann kann ich unter WSL z.B. in den User-Desktop von Windows wechseln und das Backup anschupsen:

uwe@DESKTOP-RH75H57:/mnt/c/Users/Uwe/Desktop$ pwd
/mnt/c/Users/Uwe/Desktop

sudo borg create -v /mnt/borg/borgtarget/::'{now:%Y-%m-%d_%H-%M}' .

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Linux-Software installieren mit Ansible

Ich habe deutlich mehr als nur ein oder zwei Linux-Rechner, die ich alle gern auf dem aktuellen Software-Stand halte. Da manuelle apt Kommandos auf Dauer lästig werden, habe ich mir jetzt Ansible-Skripte geschrieben, die sehr bald nach dem Aufsetzen eines Linux-Rechners die restliche Arbeit übernehmen. „Sehr bald“ heißt in dem Zusammenhang, nach der grundlegenden Installation und dem Installieren von Ansible selbst mittels apt install ansible. Ansible ist zwar eigentlich dafür gemacht, dutzende, hunderte oder gar tausende Server zu administrieren, aber für die Arbeiten am localhost bietet es auch Vorteile.

Ich nutze dabei zwei Skripte, sogenannte „Playbooks“, eines für die Kombination aus apt update/upgrade und ein Skript für die grundlegende Paketinstallation.

Hier das erste (Quelle: https://www.cyberciti.biz/faq/ansible-apt-update-all-packages-on-ubuntu-debian-linux/):


- hosts: all
become: true
become_user: root
tasks:
- name: Update apt repo and cache on all Debian/Ubuntu boxes
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600

- name: Upgrade all packages on servers
apt: upgrade=dist force_apt_get=yes

Und hier das zweite Playbook für die Installation der grundlegenden Software (lieber aus dem github ziehen, WordPress verändert den Code):


- hosts: all
become: true
become_user: root
tasks:
- name: Install git
apt:
name: git
state: present
update_cache: yes

- name: Install gparted
apt:
name: gparted
state: present
update_cache: yes

- name: Install subversion
apt:
name: subversion
state: present
update_cache: yes

- name: Install emacs
apt:
name: emacs
state: present
update_cache: yes

- name: Install geany
apt:
name: geany
state: present
update_cache: yes

- name: Install vlc
apt:
name: vlc
state: present
update_cache: yes

- name: Install ssh
apt:
name: ssh
state: present
update_cache: yes

- name: Install VSC via snap
snap:
name: code
classic: yes

Ausgeführt werden die Skripte dann mittels


ansible-playbook --connection=local --inventory 127.0.0.1, playbookname.yml

Ansible kann noch unendlich viel mehr, dazu vielleicht in weiteren Beiträgen.

Nachtrag 04.10.2020: Die YAML-Skripte liegen jetzt im Github unter https://github.com/UweZiegenhagen/ansible.

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Ubuntu auf ION-ITX

Da sich Windows XP zickig anstellte bei der Installation, habe ich auf meinem Zotac ION-ITX A gestern Ubuntu 10.04 installiert. Alle Komponenten funktionierten auf Anhieb, selbst WLAN klappt.

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Linux: Checken von Log-Dateien

Gaussian, eine Chemie-Software zur Berechnung von Molekülen, nutzt Log-Dateien,die sich einfach auch in größeren Mengen prüfen lassen:

#!/bin/bash
for i in $(ls *.log); do
 echo $i $(tail -n 1 $i)
done

Der Output sieht dann ungefähr so aus:

uwe@uwe-desktop:/desktop$ ./check_Logs 
a1_000001.log Normal termination of Gaussian 03 at Tue Apr 27 21:44:21 2010.
a1_000002.log Normal termination of Gaussian 03 at Tue Apr 27 21:41:30 2010.
a1_000003.log Normal termination of Gaussian 03 at Tue Apr 27 21:55:34 2010.

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Lubuntu

Mit Lubuntu tritt ein neuer Spieler in die Ubuntu-Welt. Scheint ganz interessant zu sein, eine Beschreibung findet sich bei http://www.chip.de/news/Lubuntu-Vorerst-kein-offizielles-Ubuntu-Mitglied_42459553.html.

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

XtreemFS freigegeben

Aus einem EU-geförderten Forschungsprojekt stammt XtreemFS, das jetzt in Version 1.0 bereitsteht. Was es tut und wozu es gut ist, erkennt man am einfachsten in folgendem Video: http://www.youtube.com/watch?v=6WP0V5ABMUA.

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website

Uzbl – Surfen im Unix Stil

Mit Uzbl (www.uzbl.org) gibt es ein neues Browserprojekt. Der Browser selbst übernimmt nur die Anzeige der Webseiten, alles anderes wird in Unix-Tradition über externe Skripte erledigt. Alles ist konfigurierbar, gesteuert werden kann per stdin, FIFO, Sockets. Interessant…

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website