Copy readonly or partially corrupted partition to New disk

Please check the following URLĀ  This will help us to copy one readonly or partially corrupted partition(even one partition is not enough) to another new harddisk of same as primay and copy the cotents.

Click here.

Categories: Linux

Increase email per hour limit for one domain

The maximum number of emails allowed for a particular domain can be changed to a different number than the system default using the file /var/cpanel/maxemails.

Just want to add an entry like following for the domain

domain.com = 1000

Execute the following script after updating the file /var/cpanel/maxemails to reflect the change.

/scripts/build_maxemails_config

Recovering data from a corrupted partition

Assume /dev/sdb7 ( say the old home partition ) is the dead partition from
which we want to recover data. This is the case where old /home partition
is corrupted so that it can no more be mounted or rsynced.

ddrescue -- tool to recover data from a dead disk

1. Download and install ddrescue on the server.

wget http://ftp.gnu.org/gnu/ddrescue/ddrescue-1.3.tar.bz2
tar xjf ddrescue-1.3.tar.bz2
cd ddrescue-1.3
./configure
make
make install

2. Make sure /dev/sdb7 is not mounted and then run ddrescue to create a
disk image of it. Current /home should have enough space to hold the
backup.img file. It will be at least twice as big as the old home
partitions used disk space.

ddrescue /dev/sdb7 /home/backup.img

3. Once the image is created run fsck on it.

fsck -r -y /home/backup.img

4. Now mount the image on to the file system. Make sure to use '-o loop'
option with mount command as you are mounting a disk image, not a
physical partition.

mkdir /old-home
mount -o loop /home/backup.img /old-home/

5. Now you can find all data on the dead home partion under /old-home.

6. Now run the rsync command to get the files from old home partition.
rsync -vrplogDtH /old-home/* /home
Follow

Get every new post delivered to your Inbox.