How To Use Rsync To Create A Backup On Ubuntu 20.04 - Serverspace
How To Use Rsync To Create A Backup On Ubuntu 20.04 - Serverspace
There are many ways to make a backup on Ubuntu. Recently, we looked at a powerful but
complex tool – Bakula. Today we will learn how to make a backup using rsync.
Ubuntu 20.04 already contains the rsync package installed. To check this and find out the
version, use the command:
If the package is not installed for some reason, use the command:
To launch rsync as a service in Ubuntu 20.04, create the /etc/rsyncd.conf file and copy
/lib/systemd/system/rsync.service to /etc/systemd/system/rsync.service.
1 de 4 14/10/20 20:33
How to Use Rsync to Create a Backup on Ubunt... https://serverspace.us/support/help/use-rsync-to...
First, add these lines to the rsync configuration file /etc/rsyncd.conf. Change the ‘path’
parameter to the path to the source files to back up. For ‘uid’ and ‘gid’, use the existing
username and group with read permissions in the backup source folders.
The data in the ‘auth users’ parameter and the /etc/rsyncd.passwd file is used for authorization
between rsync on different computers. Add a line there, like this:
2 de 4 14/10/20 20:33
How to Use Rsync to Create a Backup on Ubunt... https://serverspace.us/support/help/use-rsync-to...
Create the /etc/rsyncd.passwd file on the receiving server where the backups will be stored.
Enter the same password as on the source computer, but without the user name, set 600
permissions for it.
Replace source-server-ip with the IP address of the first server, and ‘/destination/path/’ with
the path for storing backups.
For regular backups, just add the task to the end of the /etc/crontab file.
3 de 4 14/10/20 20:33
How to Use Rsync to Create a Backup on Ubunt... https://serverspace.us/support/help/use-rsync-to...
4 de 4 14/10/20 20:33