Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
    • Ubuntu
    • LTSP
    • HowTo
      • Add proposed repository
      • Anonymous rsync
      • Automatically move photos from memory card to hard drive with udev
      • Change SSH port
      • Compile XBMC
      • Compile lshw
      • Create Gnome menu entry
      • Create SSH netinstall ISO
      • Create squashfs
      • Downgrade Libreoffice to 3.3.4
      • Enable routing
      • Extract RPM
      • Fedora
      • Fix grub on btrfs partition
      • ImageMagic
      • Intel AMT (vPro) under Linux
      • Kernel options
      • Mirror page with wget (e.g. cacti)
      • Mount FTP
      • MultiBootUSB
      • Read SNMP
      • Remotely unlock encrypted root disk using SSH
      • Resize filesystem on LVM
      • SSH VPN server
      • Samba
      • Send HTML mail
      • Skipfish
      • Software RAID
      • Start app on second desktop
      • Sync Time
      • Test network bandwidth
      • Ubuntu DVD-RAM
      • Ubuntu Notify OSD
      • UmountMemoryCard.sh
      • VNC remote help
      • Ventoy
      • VirtualBox host interface
      • access RAID LVM harddisk
      • dd
      • dnsmasq
      • gnome-shell
      • grep, linux
      • hardware, linux
      • lmbench
      • maildroprc
      • meego
      • netcat
      • network bridge
      • nmap
      • processOrder.sh
      • ramdisk
      • rsnapshot
      • rsync
      • rsync
      • sshuttle
      • streamToInternet.sh
      • swapToFile.sh
      • tmux
      • udev
      • upstart
    • BASH
    • Backtrack
    • CUPS
    • CentOS
    • Debian
    • FreeNX
    • GRML
    • Gnome
    • Grub
    • IpFire
    • Kernel
    • Linux Lite
    • SSH
    • UEFI
    • dban
    • logrotate
    • parted
    • proxy
    • systemd
  • Hardware
  • Programming
  • Databases
  • CLI
  • Multimedia
  • Plugins
  • Windows
  • Contact

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN
  • Incus

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
  • linux
  • cli

On-the-fly backup (backup a running system)

sudo rsync -e "ssh -i ${HOME}/.ssh/id_rsa" \
  -av \
  --delete \
  --numeric-ids \
  --exclude=proc/* \
  --exclude=sys/* \
  --exclude=tmp/* \
  root@${HOST}:/ .

limit bandwith to 2 mbit/s

rsync --bwlimit=2000 --delete -avz root@www.example.com:/ /media/backup/www.example.com/$(date -I)/

# Specify SSH key and configuration
sudo rsync -av \
    -e "ssh -i /home/foo/.ssh/id_rsa -F /home/foo/.ssh/config" \
    --delete \
    --numeric-ids \
    -av \
    /from/dir/ root@192.168.0.1:/to/dir

--ignore-times

Set owner and permissions

rsync -og --chown=nobody:nogroup --chmod=644 file.txt root@example.com:/dir/file.txt

Rsync files betwen two remote hosts withoud direct connection

HOST_FROM=www.example.com
HOST_TO=new.example.com
DIR_FROM=/var/www/html/
DIR_TO=/var/www/html/
ssh -A -R localhost:50000:${HOST_TO}:22 ${HOST_FROM} "rsync -e 'ssh -o StrictHostKeyChecking=no -p 50000' --delete -a ${DIR_FROM} localhost:${DIR_TO}"

Delete files after successfully copy

sshpass -p "${SSH_PASS}"\
  rsync -av --remove-source-files -e ssh ${SSH_USER}@${SSH_HOST}:~/htdocs/*.gz /mnt/backup/

rsync --remove-source-files -av /source/dir/ 192.168.1.1:/target/dir/
rsync -aHAXx --numeric-ids --delete --stats --info=progress2 --out-format="[%%t]:%%o:%%f:Last Modified %%M" --verbose -e "ssh -o

Set file permissions

rsync --chmod=400 _.file1.pem root@www.example.com:/etc/haproxy/ssl/