LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Backing up to remote server securely (https://www.linuxquestions.org/questions/linux-security-4/backing-up-to-remote-server-securely-405486/)

FourierXForm 01-19-2006 02:15 PM

Backing up to remote server securely
 
Hello,

I am trying to find a solution of backing up my server to a remote server. The key is to do this securely without having files placed directly on the server I am trying to back up. Here is what I am trying to do:

As root:
Code:

root@localhost$ tar -cz /path/to/backup | ssh backupusr@remote.host.com 'dd of=/path/to/store/backup.tar.gz'
However, this prompts me for "backupusr's" password, which I don't want since I will be using this in a script. The backupusr has public/private keys so if I am logged in as the backupusr and ssh to remote.host.com, I log right in without a password.

For security purposes, I do not want to mount an NFS share nor use Samba. Any ideas?

Thanks!

halvy 01-19-2006 02:56 PM

look into sbackup (Simple Backup)-- it was created during a google competition last summer.

i don't know if it encrypts pw or not.. but i do know it is simple, flexible and it works.

good luck.

tkedwards 01-19-2006 04:01 PM

Quote:

However, this prompts me for "backupusr's" password, which I don't want since I will be using this in a script
Create a public/private key pair as root@localhost
Code:

ssh-keygen -t dsa
Now open the file /root/.ssh/id_dsa.pub and copy and paste its contents into /home/backupusr/.ssh/authorized_keys on remote.host. Now you should be able to go
Code:

ssh backupusr@remote.host.com
and it will automatically log you in to remote.host.


All times are GMT -5. The time now is 11:44 AM.