Issue Summary: The native CWP Backup SFTP module fails (Command not found) when connecting to strict jail-shell environments like Hetzner Storage Boxes.

Resolution: We bypass the CWP module entirely by securely mounting the remote storage directly to the server's file system using SSHFS, and configuring CWP to treat it as a "Local Backup".

Prerequisites

  • Root SSH access to the CWP server.

  • Remote Storage Box Username (e.g., uXXXXXX) and Password.

  • Remote Storage Box Hostname (e.g., uXXXXXX.your-storagebox.de).

 

1.Install Dependencies & Create Mount Point:Important: Check the OS version before running this step..

For AlmaLinux / CentOS 8+:

Bash
 
yum install epel-release -y
yum install sshfs -y

For Legacy CentOS 7 (EOL Bypass):

Bash
 
rpm -ivh http://vault.centos.org/7.9.2009/os/x86_64/Packages/fuse-2.9.2-11.el7.x86_64.rpm http://vault.centos.org/7.9.2009/os/x86_64/Packages/fuse-libs-2.9.2-11.el7.x86_64.rpm
yum install epel-release -y
yum install sshfs -y

Create the generic local mount directory (White-labeled):

Bash
 
mkdir -p /backup/vault
2.Generate Root SSH Key:Press Enter for all prompts; do NOT set a passphrase..

Generate the key required for passwordless auto-mounting after reboots:

Bash
 
ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ""
3.Temporarily Mount & Push the Key:You will be prompted to enter the Storage Box password once..

Manually mount the remote storage to inject the new SSH key. Replace uXXXXXX with the actual username and hostname:

Bash
 
sshfs -p 23 -o idmap=user,nonempty uXXXXXX@uXXXXXX.your-storagebox.de:. /backup/vault

Once successfully mounted, execute these exact commands to authorize the key and secure permissions:

Bash
 
mkdir -p /backup/vault/.ssh
cat /root/.ssh/id_ed25519.pub >> /backup/vault/.ssh/authorized_keys
chmod 700 /backup/vault/.ssh
chmod 600 /backup/vault/.ssh/authorized_keys
4.Configure Auto-Mount (fstab):

Open /etc/fstab using nano /etc/fstab and append this exact line to the very bottom.

(Make sure to replace uXXXXXX with the correct credentials):

Plaintext
 
uXXXXXX@uXXXXXX.your-storagebox.de:. /backup/vault fuse.sshfs _netdev,port=23,IdentityFile=/root/.ssh/id_ed25519,allow_other,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,idmap=user,nonempty 0 0
5.Reload Systemd and Verify Automation:

Clear the manual connection, tell the OS to read the new fstab rules, and test the auto-mount:

Bash
 
umount -f /backup/vault
systemctl daemon-reload
mount -a

Verify the mount is active and showing remote storage capacity (e.g., 5.0T):

Bash
 
df -h /backup/vault
6.Create Server-Specific Directory:

Create a dedicated folder inside the vault so this server's backups do not mix with others. Replace SERVER_NAME with the actual client or hostname (e.g., Client-A-Backups):

Bash
 
mkdir -p /backup/vault/SERVER_NAME
7.Configure CWP Web Panel:

Log into the CWP Panel via the web browser for this server:

  1. Navigate to Backup Configuration.

  2. Select Local file or directory (Do not use FTP/SFTP).

  3. Set the Path to exactly: /backup/vault/SERVER_NAME

  4. Ensure Compressed is ticked and the schedule is set.

  5. Click Save Changes.

 

Was dit antwoord nuttig? 0 gebruikers vonden dit artikel nuttig (0 Stemmen)