Sponsored Content
Full Discussion: backup
Top Forums UNIX for Dummies Questions & Answers backup Post 302223808 by Ikon on Monday 11th of August 2008 12:44:44 PM
Old 08-11-2008
Another way:

How to backup your hard drive (the type of format doesn't matter) using dd.

Boot to some rescue mode by using the install media (generally "linux rescue") otherwise enter rescue mode manually: Linux Recovery

Make sure not to be booted to your hard drive, nor to have any of those partitions mounted.

Now use any combination of dd, ssh or rsh, gzip or bzip2 to backup the drive (I recommend using ssh versus rsh; however, ssh is generally not available during the rescue mode, whereas rsh is available):

You can backup the whole drive (if you have enough space on your destination system) as follows (This method also grabs the MBR):

dd if=/dev/sda | rsh user@dest "gzip -9 >20030220-backup-sda.dd.gz"

A restore using this method would be as follows:

rsh user@dest "cat 20080220-backup-sda.dd.gz | gunzip" | dd of=/dev/sda

To backup individual partitions, be sure to grab the MBR because it contains the partition table, as well as any partitions you want to backup:

dd if=/dev/sda bs=512 count=1 | rsh user@dest "cat - > 20030220-backup-mbr.dd"
dd if=/dev/sda1 | rsh user@dest "gzip -9 > 20030220-backup-sda1.dd.gz"

A restore would go as follows - be sure to restore the MBR, reboot, then restore the other partitions.

rsh user@dest "cat 20030220-backup-mbr.dd" | dd of=/dev/sda
reboot to re-read partition table (come back into rescue mode)
rsh user@dest "cat 20030220-backup-sda1.dd.gz | gunzip" | dd of=/dev/sda1

Depending on which machine is the fastest and how fast your network is, you need to decide when you will do the compression. Your choices are to compress before sending over the network, but if this machine is much slower than the server you are sending to, then it may be better to send the uncompressed data over the network to the destination server and compress as the data arrives. Just keep in mind that the transfer over the network will be a little slower if sending uncompressed data rather than compressed -- also the network speed affects this too -- 10 Mbit vs. 100 Mbit. Use your best judgement.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

regarding backup

hi i wanna know that is any such type of backup possible in Solaris or AIX that if my system crashes and i had to format the server.........then i shud be able to build the server with that backup only...........if so how thx (3 Replies)
Discussion started by: girish_shukla
3 Replies

2. UNIX for Dummies Questions & Answers

Backup

Dear All I have an HP 9000/800 UNIX machine , I have also Oracle applications 11i installed on it , we tried to take backup using fbackup command but it skipped some files ( was for database and the database was up and running ) but it took the other database files. I need to know also ,... (2 Replies)
Discussion started by: hisham.hamdy
2 Replies

3. UNIX for Dummies Questions & Answers

Check backup file size on backup tape

Hi, I performed backup on tape and I want to append more files to my previous backup on the same backup tape. But before I do that I need to know the backup file size of the first backup I performed so that I know the available size on the backup tape. Can someone help me what command I will use... (0 Replies)
Discussion started by: ayhanne
0 Replies

4. SCO

Backup to SCSI Tape Backup aborts

I am trying to make a full backup of my system using the cpio command. The Tape Unit is a SCSI DDS. The process started fine but after about 30 minutes, it just stopped and showed the following message: 1755 Signal 31 - Core dumped Any idea of what is causing this and how to fix it? ... (4 Replies)
Discussion started by: zionpc
4 Replies

5. UNIX for Advanced & Expert Users

Backup to CD ????? any one know how to do ???

hi, am trying to backup data on cd, cuz i don not have tape device....!!! i've rewritable CDROM, am using solaris 10 for x86 on vmware ..... how to make a backup data to a cd_rom againist to tape ? # ufsdump 0f cd_rom (1 Reply)
Discussion started by: sasame
1 Replies

6. AIX

backup

hi seniors today i took a backup using tar cmd in this i took two files for backup,backup was done succesfully but while viewing using tar -tvf ------- its showiing only one file at a time and i took backup in /etc/hosts,/etc/sen/nes (7 Replies)
Discussion started by: senmak
7 Replies

7. UNIX for Advanced & Expert Users

backup a file and keep every version of the backup

I am trying to backup my .bash_history and I want to keep every version of the backup. I am thinking to put one of these in my crontab. 0 0 * * 0,3 cat .bash_history > boo 0 0 * * 0,3 cp .bash_history boo I would like the backups to be called boo1, boo2, boo3, etc. I would like to keep... (7 Replies)
Discussion started by: cokedude
7 Replies

8. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

9. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies
partimage(1)						      Partition Image Manual						      partimage(1)

NAME
partimage - back up and restore disk partitions SYNOPSIS
partimage [ -bcdehimMnoSvwy ] [-B 'pattern response string'] [-z compresslevel] [-V volumesize] [-f actionatend] [-s server] [-p port] [-a mountoptions] [-U username] [-P password] [-g loglevel] [ save device image_file ] partimage [ -bcdehimMnoSvwy ] [-B 'pattern response string'] [-z compresslevel] [-V volumesize] [-f actionatend] [-s server] [-p port] [-a mountoptions] [-U username] [-P password] [-g loglevel] [ restore device image_file/'stdin' ] partimage [ restmbr image_file ] partimage [ imginfo image_file ] DESCRIPTION
partimage backs up disk partitions into image files and restores them. OPTIONS
-z val, --compress val Set image file compression level: val=0: don't compress: very fast but very big image file val=1: compress using gzip: fast and small image file (default) val=2: compress using bzip2: very slow and very small image file -c, --nocheck Don't check the partition before saving. -o, --overwrite Overwrite the existing image file without confirmation. -d, --nodesc Don't ask any description for the image file. -V vol, --volume vol Split image into multiple volumes files. vol will be the size in KB of volumes. -w, --waitvol Wait for a confirmation after each volume change. -e, --erase Erase empty blocks on restore with zero bytes. -m, --allowmnt Don't fail if the partition is mounted. Dangerous! -M, --nombr Don't create a backup of the MBR (Mast Boot Record) in the image file. -h, --help Show help. -v, --version Show version. -f action, --finish action Action to do if finished successfully: action=0: wait (do nothing) action=1: halt (power off the computer) action=2: reboot (restart the computer) action=3: quit -b, --batch batch mode: the GUI won't wait for an user action. -B 'pattern response string', --fully-batch 'pattern response string' full batch mode: the GUI is not being displayed. Rather status messages are displayed as normal text. The pattern response string has the following format: '<glob-pattern>=<response-value>;...' where the glob pattern is matched against the string <window-title>/<message-text> of the message dialogue box to be displayed. For dialog boxes with buttons in the window, the <response> must be the exact button text. The pattern response string usually needs to be quoted as above. -y, --nosync Don't synchronize the disks at the end of the operation. Dangerous! -s addr, --server addr Give partimaged server's ip address. -p port, --port port Give partimaged server's listening port. -g debuglevel, --debug debuglevel Set the debug level to debuglevel (defaults to 1). -n, --nossl Disable SSL in network mode. -S, --simulate Simulation of restoration mode. -a str, --automnt str Automatic mount with X options. Read the doc for more details. -U name, --username=name Username to authenticate to partimage server. -P pass, --password=pass Password for authentication of user to partimage server. EXAMPLE
partimage -z1 -o -d save /dev/hda12 /mnt/backup/redhat-6.2.partimg.gz partimage -z1 -om save /dev/hda9 /mnt/backup/win95-osr2.partimg.gz partimage restore /dev/hda13 /mnt/backup/suse-6.4.partimg cat debian.partimg.000 debian.partimg.001 | partimage restore /dev/hda1 stdin partimage restmbr /mnt/backup/debian-potato-2.2.partimg.bz2 partimage imginfo /mnt/backup/debian-potato-2.2.partimg.bz2 SEE ALSO
partimaged(8) DIAGNOSTICS
You can read options set at compile time running 'partimage -i'. When using batchmode, exit status is normaly 0. CAVEATS
Supported file systems: Ext2/3, Reiser3, FAT16/32, HPFS, JFS, XFS, UFS(beta), HFS(beta), NTFS(experimental) FAT12 will never be supported. BUGS
Refer to BUGS file to read them. AUTHOR
Franck Ladurelle <ladurelf@partimage.org> Francois Dupoux <fdupoux@partimage.org> 3rd Berkeley Distribution 30 May, 2002 partimage(1)
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy