Backup in /home2 a bad idea?

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
Is daily backup in home2 a bad idea? If it is.. Could I do home2/backup ? Do I have to setup a folder? if so how do I go about doing that? Or will cpanel do it for me automatically?

thanks


this is what I saw in the bottom line in settings.. - Backup Destination (this should be a directory/NFS/Coda mount with at least twice the space of all your /home* partitions. Setting this to /home is a very bad idea.)

Thats why i am wondering about home2/backup ? and if i have to create the folder or if i can just type it in..
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you are using /home2 for account creation, then using /home2 for your backup would be a bad idea. Any partition being used for newly created accounts would mean that you've just used the same mount point as some of your accounts.

The idea behind backing up data to a different mount point is that if the current /home directory becomes read only or corrupted, you have your backup data in another directory. If you have your backup in the same directory as accounts, then you no longer have reliable backups that will be able to be used if /home2 becomes read only or corrupted.

I would highly suggest mounting another drive called /backup or using remote FTP backups to have data in a different mount or on a different machine.
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
Currently no one is using home2/ I was going to use it for my backup... How do I turn home2/ into a backup? OR how how would I add a backup drive? I have plenty more room for plenty more drives.

thanks
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you aren't using /home2 for accounts, I would ensure that WHM > cPanel & WHM Basic Setup has nothing listed for the following option:

Additional home directories matching the following value will also be used for new home directory creations. (Leaving this value blank disables the feature.) This option only takes one value.
If it has home listed, then /home2 will automatically be used for new accounts whenever it has less disk space used than the /home partition. By setting that to blank, then only /home will be used for new accounts.

Next, is /home2 a different drive or mounted separately? If not, then I would highly suggest contacting your datacenter, NOC or provider for assistance in that portion. Any commands I noted here might wipe out your existing file system if done improperly.
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
Its a completely different drive. Ok... I formated it did all that jazz.. then went to nano /etc/fstab/ made my changes but then i get

I added - /dev/sdb1 /backup ext3 defaults 1 2 - into fstab

saved...
it also says - /dev/sdb1 /home2 ext2 defaults,usrquota 1 2 ??? is that correct I no longer have a home2/




I type - mount /dev/sdb1



mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Any ideas?
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
What does running "fdisk /dev/sdb1 -l" show? Also, did you check "dmesg | tail" as it suggested?
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
strange.... I wondering what i did wrong


Disk /dev/sdb1: 160.0 GB, 160039240704 bytes
255 heads, 63 sectors/track, 19456 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb1 doesn't contain a valid partition table
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
ok.... I did miss something.. now im getting this

mount point /backup does not exist
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
i think im missing something... I tried mkdir /mnt/backup

then i on the next line i typed mount /dev/sdb and I still got mount point /backup does not exist
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
wait i think i got - ah- mount /dev/sdb /mnt/backup


mkdir /mnt/backup
mount /dev/sdb /mnt/backup
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
ok this may seem like a really sutpid question but... how do I know its working correctly?


ok... thanks again.. somtimes i just love to rush.. For anyone who is wondering... - then it will show up in current disk usage...


mkdir /backup

then

mount /dev/sdb /backup
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you were able to mount it and then it works for putting backups there, and it shows up when you issue "mount" and "df -kh" commands, it should be working.
 

webstuff

Well-Known Member
Jul 19, 2011
76
2
58
yes i was... thank you again so much... I'm so excited. :) I love it! I love cpanel..