Jump to content

Featured Replies

Posted
comment_532

Hi - i have changed my SSH port to custom port (not 22). I have placed the ssh id_rsa.pub in Hetzner storage box through SCP and able to remote login from my CWP server using the SSH keys. 

Back up is set up in local machine. The backup folder exists, but the Remote Sync test is failing. Top three tests are green but test for remote connection is tested/activated is red. 

online.png Checking if config file exists /usr/local/cwp/.conf/remote_backup.conf.
online.png Checking if key file exists /root/.ssh/backup/id_rsa.pub
online.png Checking if backup folder /backup exists and creating it if not exists.
offline.png Checking if remote connection is tested and activated.
 

I get below error: 

Command not found. Use 'help' to get a list of available commands.
Connection_Failed

What am I missing here?

 

Solved by Sandeep B.

Go to solution
comment_534

i did it like this:

ssh -p23 uXXXXX@uXXXXX.your-storagebox.de mkdir backup

connects to port 23 to the storage box and makes the folder backup

then to send the backup use:

rsync --progress -e 'ssh -p23' --recursive /home <username>@<username>.your-storagebox.de:/backup

 

comment_537
5 hours ago, sal83 said:

Thanks for the inputs, I just set it up on another FTP server which provides rsync. Remote sync did not work with Hetzner. 

then you need to use scp to transfer files 

 

scp -P 23 /path/of/the/source/backupfile.zip username@backup_server_hostname:/path/of/the/backup/directory/

 

comment_539

The absolute easiest way is to mount the storage box as a volume and then backup to that location.

Then use the NEW backup solution in CWP to backup to that location, or you can use rsync to backup to that location.

I have one volume at 

Path: /mnt/backup-server/backup

 

comment_560

 

In Linux-based systems, you can use the following command on the CLI to mount the file system:

 

mount.cifs -o user=<username>,pass=<password> //<username>.your-storagebox.de/backup /PATH/FOLDER

By adding the following line to /etc/fstab, your system will automatically mount the file system at boot. (It is a single line!):

//<username>.your-storagebox.de/backup /mnt/backup-server cifs iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=<system account>,gid=<system group>,file_mode=0660,dir_mode=0770 0 0

The file /etc/backup-credentials.txt (mode 0600) should contain two lines as follows:

username=<username>
password=<password>


In Debian-based distributions, the command is provided via the package cifs-utils.

apt-get install cifs-utils

On Debian Wheezy based systems, edit the parameters as follows if you are having problems:

rsize=65536,wsize=130048

You should also add the following lines to /etc/rc.local:

modprobe cifs
echo 0 > /proc/fs/cifs/OplockEnabled

 

  • 1 month later...
comment_909
On 2/19/2024 at 8:30 PM, leisegang said:

 

In Linux-based systems, you can use the following command on the CLI to mount the file system:

 

mount.cifs -o user=<username>,pass=<password> //<username>.your-storagebox.de/backup /PATH/FOLDER

By adding the following line to /etc/fstab, your system will automatically mount the file system at boot. (It is a single line!):

//<username>.your-storagebox.de/backup /mnt/backup-server cifs iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,uid=<system account>,gid=<system group>,file_mode=0660,dir_mode=0770 0 0

The file /etc/backup-credentials.txt (mode 0600) should contain two lines as follows:

username=<username>
password=<password>


In Debian-based distributions, the command is provided via the package cifs-utils.

apt-get install cifs-utils

On Debian Wheezy based systems, edit the parameters as follows if you are having problems:

rsize=65536,wsize=130048

You should also add the following lines to /etc/rc.local:

modprobe cifs
echo 0 > /proc/fs/cifs/OplockEnabled

 

Tried this a year ago and after spending days testing I failed to get it to work. So I gave up and got a cheap storage vps with rsync and full ssh access. Works like a charm.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now