I have Asterisk running on CentOS. I am not familiar with the command line. I want to take the backup of entire system like a mirror image on a CD/DVD or external Hard drive. Can you please help me with that.
Make sure you are running from a Live CD or some system that does not depend on the partition you want to save. You cannot have any file locks or changing files.
Make sure you have more free space on a single drive than the partition you want to backup.
Make sure you have root privileges.
Determine the device name (i.e. /dev/sda1)
Determine the backup file (i.e. /mnt/sdb2/backupOfSda1.iso)
Modify and execute the command below based on the values above:
dd if=/dev/DEVICENAME of=Path/to/storage/location/backupFile.iso conf=noerrors,notrunc
thnks for the help....
I was wondering to plug in my USB to the workstation which i want to backup. Asterisk is running on Centos which is hardly taing any space. How to determine device name?what is the command .
I have the root privileges. Can you please give me steps to type in command prompt please. I want to backup entire image of Asterisk and there is nothing else the system.
Please help me providing steps after i plug in my USB and enter the root credentials
BE VERY CAREFUL WITH THIS COMMAND AS YOU CAN DESTROY YOUR ASTERISK PARTITION
See the bottom of this post for a safer alternative.
if you enter the command below, you will get a list of storage devices on your system.
sudo fdisk -l
A sample output from my system shows:
$ sudo fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5b8ef2f9
Device Boot Start End Blocks Id System
/dev/sda1 * 2557 2678 979965 82 Linux swap / Solaris
/dev/sda2 1 2556 20531038+ 83 Linux
/dev/sda3 2679 9729 56637157+ 83 Linux
This shows that this system has one drive (/dev/sda) with three partitions (/dev/sda1, /dev/sda2, /dev/sda3).
I know that I have some data on sda3 so my backup command might be something like:
dd if=/dev/sda3 of=/home/${USER}/Desktop/20100326_dataBackup.iso conf=noerrors,notrunc
In this example, I selected the path to my Desktop folder as the location to save the backup image. You will need to find where your USB drive is mounted. It might be something like /mnt/VolumeNameOrId and use that location instead.
BE VERY CAREFUL WITH THIS COMMAND AS YOU CAN DESTROY YOUR ASTERISK PARTITION
The info above will create an iso image file of the entire partition containing the data you want to backup.
A safer approach is to simply use the tar command to make a backup of the files:
tar -xcvlf 20100326_dataBackup.tgz /path/to/asterisk/files