LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Saving backup archives on a separate computer running Debian. (https://www.linuxquestions.org/questions/debian-26/saving-backup-archives-on-a-separate-computer-running-debian-4175478202/)

edbarx 09-23-2013 09:00 AM

Saving backup archives on a separate computer running Debian.
 
In my past Windows days, I used to save files from one computer to another using the netbui protocol.

Is there any possibility of doing the same in Debian? If yes, what keywords in google search should I use?

TobiSGD 09-23-2013 09:42 AM

Just use rsync or scp, work fine here.

edbarx 09-23-2013 10:44 AM

Quote:

Originally Posted by TobiSGD
Just use rsync or scp, work fine here.

Could you please, give me an example of any command syntax you would use?

TobiSGD 09-23-2013 02:32 PM

Of course. To have this working easily you must run a SSH server on the target machine. To automate the whole thing you should enable and configure key-based authentication on the target machine. If you do the copy action manually and are comfortable with typing a password this isn't necessary.
I always use rsync for such actions, the syntax comes down to
Code:

rsync /path/to/source/on/local/machine remote_user@remote_machine:/path/to/target/folder/on/remote/machine
For example, if I want to copy the file /home/tobi/test.txt to the folder /data/backups on a remote machine called server (known with IP in my hosts file) using the user backup_user this would look like
Code:

rsync /home/tobi/test.txt backup_user@server:/data/backups
The rsync manpage is very extensive and has quite a lot examples, so it will definitely help to look at that.

edbarx 09-23-2013 09:12 PM

Thanks. I tested the command you gave me, but failed due to this error:
Code:

rsync /home/edbarx/sda3_24.09.2013.fsa edbarx@edbarx-dsk:/home/edbarx/
ssh: Could not resolve hostname edbarx-dsk: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]


TobiSGD 09-23-2013 09:42 PM

That means that you have the machine edbarx-dsk not in your /etc/hosts and your DNS provider can not resolve that name. Either add the machine to /etc/hosts or use the IP instead.

edbarx 09-23-2013 10:28 PM

I used the IP, but I don't know if I am doing everything right. The 'remote' computer is connected to the same router with which the source machine is connected. The command I used is as follows:
Code:

~$ rsync /home/edbarx/sda3_24.09.2013/fsa edbarx@192.168.1.100:/home/edbarx/
ssh: connect to host 192.168.1.100 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]

It appears that the 'remote' machine requires some configuration of which I have no idea.

TobiSGD 09-23-2013 10:37 PM

Do you have a SSH daemon running on the target machine? This necessary to get this working.


All times are GMT -5. The time now is 02:59 PM.