Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I know this question has been done to death but I can't find anything that applies directly to this situation.
I have a group of around 20 production machines, which need to be backed up nightly to a Server. Since the "push" method wouldn't work to well as the machines are turned off for night, I need a pull method that issues a shutdown command after that machine is done backing up.
I've used Cron with SSH+Rsync for nightly backup push jobs, i.e. the client sends it's backup to the server
Code:
# m h dom mon dow command
00 01 * * * /usr/bin/rsync -avz --exclude-from=/home/client4/.exclude -r --delete -e ssh /home/client4/ server@server:/backup/client4
But I want the Server to automatically pull backups from 20 machines with no human intervention (passwordless) and without having to wade through 20 entries in cron to make little changes.
I'm thinking Cron is going to get a bit crowded and messy, so is there an easy way to script what I want? Do I still have to make a separate script for each machine, this would defeat the purpose of scripting and I could just stay with cron. What setup is best suited in this situation?
I know this question has been done to death but I can't find anything that applies directly to this situation.
I have a group of around 20 production machines, which need to be backed up nightly to a Server. Since the "push" method wouldn't work to well as the machines are turned off for night, I need a pull method that issues a shutdown command after that machine is done backing up.
I've used Cron with SSH+Rsync for nightly backup push jobs, i.e. the client sends it's backup to the server
Code:
# m h dom mon dow command
00 01 * * * /usr/bin/rsync -avz --exclude-from=/home/client4/.exclude -r --delete -e ssh /home/client4/ server@server:/backup/client4
But I want the Server to automatically pull backups from 20 machines with no human intervention (passwordless) and without having to wade through 20 entries in cron to make little changes.
I'm thinking Cron is going to get a bit crowded and messy, so is there an easy way to script what I want? Do I still have to make a separate script for each machine, this would defeat the purpose of scripting and I could just stay with cron. What setup is best suited in this situation?
Thanks. That looks pretty good. How is this sample config? I think that would accomplish what I want, except for shutting down the machine after it's done being backed up at the end of the day...
Thanks. That looks pretty good. How is this sample config? I think that would accomplish what I want, except for shutting down the machine after it's done being backed up at the end of the day...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.