This document outlines steps to backup files from an Ubuntu server to a Centos server using Rsync. It involves installing Rsync on both servers, configuring Rsyncd.conf files and passwords, creating a backup folder on the Centos server, and running an initial rsync command to transfer files from Ubuntu to Centos. It also describes setting up a cron job to automatically run the backup every 21 hours and 30 minutes.
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Linux server backup solution
1. Linux Server Files Backup Solutions
Goal:
- Backup files in Ubuntu server to Centos server
Preparation:
- Ubuntu Server (v11.10)
- Centos Server(v6.0)
Steps:
1. Install Rsync software into Ubuntu
- Ubuntu default configuration files include rsync
- Configure rsyncd.conf (Detailed configuration please reference relative materials)
2. - Above is rsyncd.conf
- Set password for rsync
- Rsyncd.pass’s format is – name:password, here I set backup:backup
3. - This step is really important, to change the permission of rsyncd.pass.
2. Install Rsync software into Centos
- Before install rsync, xinetd service should be installed first, because rsync is
running based on xinetd.
- Start xinetd service
- Install rsync services.
- Modify rsyncd.conf (Detailed configuration please reference relative materials)
4.
5. - Here is my Centos rsyncd.conf
- Set password
- Format- name:password, here I use backupuser:123456.
6. - Change ownership of rsyncd.secrets (Of course you need to change it’s
permission to 600 as Ubuntu)
- Start rsync service.
3. Start to backup
- Put rsync service to start file so that each time when server is restarted, this
service will start, too.
- Make a file folder named “backup”(or any name you want) in Centos server to
receive rsyncd files.
- Now we can see, nothing in backup.
- Rsync from Ubuntu to Centos, here I chose /home/carol this folder to be
downloaded to Centos.
7. - Here is the files under /home/carol which I need to rsync to Centos
- This is the process of rsync.
8. - Now we can see the same files under /home/carol of Ubuntu now have been
downloaded to Centos backup file folder.
4. Let backup be automatically.(Here we use cron service)
- Start crond service
- Set the time of backup, here I set every 21 hours 30 minutes, the backup
command will be executed.