Skip to content

Backup

Backup

  1. We use scp to transfer backup file in each server to a centralized backup server. We need to setup quick login with ssh Client Keys.

    1. Generate a public/private key pair in the centralized backup server
      ssh-keygen –t rsa
      Just hit Enter when asked, this leave the passphrase empty.
      This created two files, ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.

    2. Copy id_rsa.pub to the server that you wish to use quick login. Create the .ssh folder if needed.
      scp /root/.ssh/id_rsa.pub root@host:/root/.ssh/authorized_keys2

      Note: Copy the contents of id_rsa.pub and paste to “/root/.ssh/authorized_keys2” the server that you wish to quick login, when more than 1 server that would liked to use quick login to the particular server.

    3. In order to allow the server to backup itself, you can copy the content of id_rsa.pub and adding into authorized_keys2.

  2. Synchronize backup file within localhost.

    rsync -zvr /file/hd1/* /backup/hd1

Categories: Lesson, Linux, Server, Solution, Web Hosting.

Comment Feed

No Responses (yet)



Some HTML is OK

or, reply to this post via trackback.