Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 have RH-9 installed in my system. 40GB H drive (IDE). I installed Linux on 25 GB ( hda1)
I have second 14 GB with ext-3 type partition (Free). hda2
I want to use this partition for backup and in place of existing /home directory.There are home folders of 20-30 users (SMB USERS) on existing /home . I want to shift these user folders on that free partition as well to lessen the load.
I have to mount every time that partition as I start the system with
Mountt /dev/hda2 /mnt/home
(/mnt/home is empty folder where i mount that partition)
How can I permanently mount that free partition in my system??????
Dear Both members
Bravo
I did as u said and it is woking as HEAVEN.
Thanks a lot
At the mment ,Instead of making hda2 /home , I mounted hda2 on /mnt/home.
Now, I planed to get all of my existing user Folders on existing /home. I will take backup of all these folders on /mnt/home daily ,to secure the data.
How is this approach???????
I need yr feed back.
Originally posted by mwj ...Now, I planed to get all of my existing user Folders on existing /home. I will take backup of all these folders on /mnt/home daily ,to secure the data.
How is this approach???????
I need yr feed back.
Sounds like a good plan ........You can run a daily backup as a cron job automatically, so you don't have to remember to do so each time........after all, that's what computers are for, to make life easier for us.
Basiclly, you add a script that will execute the backup procedure on a daily basis. This can be a shell, bash or a perl script, which is placed in the system's cron directory, or any directory you specify in crontab using the 'crontab -e' command. At least that's how it's done in Slack. I'm not familiar with how it's done in RH...................Read the manpages for crontab (man crontab), man crond, man run-parts, to get an idea of how cron jobs are run. Also run 'crontab -e', which is where the cron jobs are placed. It may already have some entries which you can look at. For example, heres what my crontab looks like:
Code:
# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null. We'll do this here since these jobs should run
# properly on a newly installed system, but if they don't the average newbie
# might get quite perplexed about getting strange mail every 5 minutes. :^)
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run twice daily cron jobs at 4:50 and 16:50 (4:50pm) every day:
50 4,16 * * * /usr/bin/run-parts /etc/cron.twicedaily 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
Note: The twice daily entry is one I added, which runs every 12 hours, while the rest are the defaults that come with Slack. RedHat might have something a little different, but this should give you an idea of what to expect. And the default editor for 'crontab -e' is vi. If you want to use a different editor, then you'll need to add a VISUAL variable in your login script, ~/.bashrc (or whatever you're using). For example, I prefer pico, so I added this at the bottom of ~/.bashrc:
VISUAL = 'pico -w'
export VISUAL
You will also need to know something about shell scripting. Go to this thread which shows you where to go to get started on bash scripting...........................You can find some ready-made backup scripts that might suit your purposes. Go to SourceForge's search page and enter 'backup script' (no quotes). Make sure there's a check mark next to "Require All Words". This will give you quite a few choices. If you choose a perl program, you'll need to know enough about perl so you can edit it for your particular needs.
This should get you started. Hope this helps.
---thegeekster
Here's a good start on Bash scripting, and it also uses examples creating a backup script. This is from TLDP (The Linux Documentation Project), which is usualy installed on most Linux distros (under /usr/docs/)......or you can download all the HOWTOs in html format - Linux-html-HOWTOs - and put them in your /usr/doc/ directory. You can also get the htmls in a single-page format, too - Linux-html-single-HOWTOs............Just look for 'Bash-Prog-Intro-HOWTO'
I prefer using the html format because it's easier to navigate and skip around from one section to another.
---thegeekster
Last edited by thegeekster; 01-21-2004 at 11:49 PM.
Hi thegeekster
Thanks alot for all of yr time and preciuse peaces of guidlines.I am already on my way toward bash programing after yr previuos post.
I have boohmarked alll those links and also down loaded the material u sugested .Now I will take some time to go through it. Pray for success.
mwj
LOL.........you're welcome. Glad you find it uselful
Shell scripting is an excellent intro into the world of programming in general, as well as a great way to learn more about what Unix/Linux is capable of.......................If you like it enough and decide to go on to more advanced programming, you'll have an easier time understanding the concepts involved and will be able to spend more time on learning the new syntax for the other language(s).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.