Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
deb11:backuppc [2025/12/20 13:35] – [Configuration for Windows 10 running WSL1] Bernard Condraudeb11:backuppc [2025/12/21 15:18] (current) – [Maintenance] Bernard Condrau
Line 18: Line 18:
   * [[deb9:luks|LUKS - Disk Encryption]]   * [[deb9:luks|LUKS - Disk Encryption]]
   * [[deb9:encrypted|Encrypted partitions/folders with auto-mount]]   * [[deb9:encrypted|Encrypted partitions/folders with auto-mount]]
 +
 +==== Setup remote ping ====
 +  * Make sure necessary apps are installed, see [[deb11:setup#install_and_configure_packages|Install and configure packages]]
 +  * Log in to the DiskStation with SSH, sudo to root, and create the file //backuppc// in folder /etc/sudoers.d/. As there is no //visudo// on DSM you must be extra careful to copy the following lines exactly, otherwise you may render sudo unable to elevate to root:<code>cd /etc/sudoers.d
 +sudo vim
 +# Allow backuppc
 +backuppc ALL=(root:root) NOPASSWD: /var/services/homes/backuppc/bin/rsync</code>
  
 ==== Setup boot configuration ==== ==== Setup boot configuration ====
Line 25: Line 32:
  
 ==== Maintenance ==== ==== Maintenance ====
 +  * Update host\\ <color red>**After OS change (hardware, SSH, etc.) of a host you must manually SSH into the host from the server to accept the changed SSH key**</color>
   * Delete a backup. If you delete several backups, delete non-filled backups which were taken after a filled backup first.<code>/usr/local/BackupPC/bin/BackupPC_backupDelete -h host -n num </code>[[http://backuppc.sourceforge.net/BackupPC-4.0.0.html#Other-Command-Line-Utilities|Other Command Line Utilities]] and [[https://github.com/backuppc/backuppc/blob/master/bin/BackupPC_backupDelete|BackupPC_backupDelete]]   * Delete a backup. If you delete several backups, delete non-filled backups which were taken after a filled backup first.<code>/usr/local/BackupPC/bin/BackupPC_backupDelete -h host -n num </code>[[http://backuppc.sourceforge.net/BackupPC-4.0.0.html#Other-Command-Line-Utilities|Other Command Line Utilities]] and [[https://github.com/backuppc/backuppc/blob/master/bin/BackupPC_backupDelete|BackupPC_backupDelete]]
 ==== Links ==== ==== Links ====
Line 96: Line 104:
  
 ==== Configuration for Windows 11 (22H2 and higher) running WSL2 or Windows 10/11 running WSL1 ==== ==== Configuration for Windows 11 (22H2 and higher) running WSL2 or Windows 10/11 running WSL1 ====
-  - Windows 10: Install [[win10:wsl|Windows Subsystem for Linux]] on Windows 10 hosts, which installs a //Debian// command line layer on top of your Windows 10 installation.\\ <color red>**WSL1 installs a bridged network connection which receives an IP address in the same subnet as Windows**</color>.+  - Windows 10: Install [[win10:wsl|Windows Subsystem for Linux]] on Windows 10 hosts, which installs a //Debian// command line layer on top of your Windows 10 installation.\\ <color orange>WSL1 installs a bridged (mirrored) networking mode which receives an IP address in the same subnet as Windows.</color> 
 +  - Windows 11: Enable [[win10:wsl|Windows Subsystem for Linux]] on Windows 11 hosts as //Windows feature//, then install //Debian// from the Microsoft store.\\ <color orange>Set the WSL networking mode to //mirrored// by creating file ''C:/Users/<user>/.wslconfig'' with following content:</color><file>[wsl2] 
 +networkingMode=mirrored</file>
   - Install ssh and rsync:<code>sudo apt install ssh rsync</code>   - Install ssh and rsync:<code>sudo apt install ssh rsync</code>
   - Harden [[deb9:ssh#Settings|SSH]] and restart the service.   - Harden [[deb9:ssh#Settings|SSH]] and restart the service.
Line 110: Line 120:
   * [[https://man.openbsd.org/OpenBSD-current/man8/sshd.8#AUTHORIZED_KEYS_FILE_FORMAT|authorized_keys]]   * [[https://man.openbsd.org/OpenBSD-current/man8/sshd.8#AUTHORIZED_KEYS_FILE_FORMAT|authorized_keys]]
  
-==== Configuration for Windows 11 running WSL2 or Hosts without fixed IP address ==== +==== Configuration for Windows 11 (lower than 22H2) running WSL2 or Hosts without fixed IP address (for example laptops when outside of your LAN) ==== 
-  - Windows 11: Enable [[win10:wsl|Windows Subsystem for Linux]] on Windows 11 hosts as //Windows feature//, then install //Debian// from the Microsoft store.\\ <color red>**WSL2 installs a NAT'ed network connection and assignes a new IP address on every reboot**</color>.+  - Windows 11: Enable [[win10:wsl|Windows Subsystem for Linux]] on Windows 11 hosts as //Windows feature//, then install //Debian// from the Microsoft store.\\ <color orange>WSL2 lower than 22H2 installs a NAT'ed network connection and assignes a new IP address on every reboot, so we need to establish a tunnel originating from the Host. For Hosts outside of your LAN we use the same approach.</color>
   - Install ssh, autossh and rsync:<code>sudo apt install ssh autossh rsync</code>   - Install ssh, autossh and rsync:<code>sudo apt install ssh autossh rsync</code>
   - Harden [[deb9:ssh#Settings|SSH]] and restart the service.   - Harden [[deb9:ssh#Settings|SSH]] and restart the service.