Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am building a backups script and would like to know how to do the following:
1. count /home , /home2 and /home3 subdirectories size while checking load after each subdirectory and if load is higher than X.XX sleep for Y seconds.
2. Then Tar all folders to the specific directory and transfer to remote server, while checking the load also.
Could anyone suggest something?
How would I accomplish the following with bash script:
1. Take one (first) directory from the /home* (need to scan all home, home2, home3)
2. Check size
3. If size is bigger than X MB, add this dir name to somefile.txt ELSE tar this directory.
4. Move it to the specific folder
5. Use FTP to transfer it to remote server
6. Check server load
7. If load is higher than X.XX, sleep 30s, try again..
8. If load is lower than X.XX, go to step 1 and take second folder.
Would that be hard to accomplish?
Last edited by colucix; 09-06-2011 at 05:25 AM.
Reason: Essentaily the same question.
No it's not my homework. I need to build a custom backup script, as our company has many clients and cPanel backup overloads the server too much.
So the point is to create a custom script which would do the backups maybe a bit more slow, but without causing server load. Also, do not backup accounts bigger than X MB.