Help - Search - Members - Calendar
Full Version: backing up to second drive - how to?
The Planet Forums > Control Panels > cPanel/WHM
pjd2003
hi all
i have a second drive in my box now, cPanel/RHEL on 1.7 celeron.
what i want to know is - how do i configure the backup option to backup every day to the second drive?
new to linux, so clear instructions would be much appreciated - thanks.
eddy2099
If you are using CPanel/WHM, it is easy..

1) Ensure that you have your second harddisk installed and mounted. Find out what the name of the harddisk is, usually it is /home2

2) In WHM, there is a backup feature.. just enable it and provide it with a path to backup into, in this case, it would be /home2 .

That should be it.
kris1351
I recommend changing the second drive mount from /home2 to /backup. WHM will install home directories to /home2 if it exists and is using less space than your /home.
pjd2003
ok they tell me the second drive is called /hdb so i have just gone ahead and put /hdb as the path. what about the other options? i have left them all on default i.e.


daily backup
every dayremount/unmount DISABLED
Bail Out - DISABLED
Incremental - DISABLED
Backup accounts -ENABLED
Backup config files - ENABLED
SQL Dbs - Per Accounts Only
Backup raw access logs - ENABLED (<----- CHANGED THIS FROM DEFAULT)
Backup type - STANDARD
Destination - /hdb


does this all look ok?
would i be able to restore everything shoud, say, the main drive fail (i.e. every site i am hosting) without much trouble? maybe incremental backup is more sensible in terms of cpu load during backup?

also, one last question - how can i determine the time of day that the backup occurs? i am in the UK and would like it to happen say at 4am or something.

thanks!
eddy2099
Looks alright.. but you might want to check the Days of the Week to run the backup.

Yup, it will be run during the time when the WHM does all those updating and so on..
pjd2003
cheers eddy
the magic question - how do i change the time that WHM does all its updates? do i get in touch with SM support is it just a simple config setting somewhere?
cheers
eddy2099
Well, the backup is done on your server so it really does not affect SM's end.

If I am not wrong, it is controlled by a cronjob. I guess you just need to change the timing of the cronjob and that should do the trick.
treasureman
/scripts/upcp is run by cron and it updates cpanel each night (depending on your update preferences) and when it finishes it also runs the backup if it is enabled.

To see what time yours is running go to a root shell and type in crontab -l and it will show all your cron jobs. To edit use crontab -e and change the time and save it and it will install a new cron. I am assuming you have pico installed on your machine. Pico did not come on the RHE super server I have with SM and I had to install it.
pjd2003
hmm crontab -e is giving me an error even though i got nano installed.
also crontab -l says 'DO NOT EDIT THIS FILE'
why does something as easy-sounding as installing pico lead to a 2 hour marathon google session with no definitive answers? icon_biggrin.gif
treasureman
I followed the instructions near the bottom of this thread and installed pico on my super server RHE box here at SM:

http://forums.servermatrix.com/viewtopic.html?t=2351

After I did that I was able to edit the crontab as per the earlier post I made.
jjf1990
From the WHM you can also install RPM's under software.
pine = pico editor is located there. That's how I installed it.

So is mc for midnight commander in the rpm's you can install. That program helps a lot, just be careful with it.
Remember to type
LANG=C
before running mc.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.