I have two Ubuntu 20.04 that already has rsync configured in them. I installed Virtualmin and went though the initial install adding a virtual server.
What I need to do is mirror or replicate one VPS to a remote VPS and keep them up to date.
My next step would be to work towards a total failover from the main VPS to the replica should something happen. But for now I just need help using rsync to move everything from one Virtualmin VPS to the other and keep it up to date.
rsync -rtu home. root@111.111.11.111:/home. is not working an coping the virtual servers over of the databases.
What does rsync offer that a simple backup doesn’t already do.?
I have never really understood the difference.
Server1 is the point of truth it has perhaps 1000’s of clients making transactions through it at any point in time.
Server 2 is an identical copy of Server1 taken at a point in time.
Some monitoring mechanism? Switches DNS from Server1 to Server2 due to Server1 going offline?
But Server2 can never be guaranteed to be true - it is only a recent backup.
rsync does more that backup files that changed.
rsync. -rtu
Moving a directory is simple. Add the -d option, and it will move only the directory. If you want to move the directory and its contents, use -r instead to recursively copy over all files and subfolders. While we’re at it, let’s tack on the -t option. This option will copy the date and time that the file was last changed. Using -t is good for keeping accurate records of when a file was last edited. These options will work with pushing or pulling. and the u:
The -u option tells rsync to update only different/changed/added files from the SOURCE to the DESTINATION .
I can use cron jobs to update every 30 min or what time frame I need as what I create was a web app that lets people create reports using any device connected to the internet and I need keep this data in sync in case of a cable cut or some other failure so I would configure a failover to the replica.
So all it really is only a different form of backup.
The name suggested to me it might be real synchronisation. Something that is very difficult.
There are other forms of simply making a copy to a different location.