backup


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers backup
# 1  
Old 08-11-2008
backup

Hi guys need your help!.... i'll have to do a backup of the entire files systems of the one server , but i have to do to another server because we do not have a tape device or some, do you know what instruction i have to use?
the backup server is a linux box and the server to being backup is a solaris.
Thanks in advance!
# 2  
Old 08-11-2008
- Share your file system with NFS.
- mount drive on remote host and then locally copy that data to other disk partition.

Advantage
- Doing network copy takes time hence mounting drive locally helps
- NFS copying is faster compare to other copying method.

- nilesh
# 3  
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.
# 4  
Old 08-11-2008
Thanks...do you have the commands about how i can do that?
# 5  
Old 08-11-2008
Quote:
dd if=/dev/sda | rsh user@dest "gzip -9 >20030220-backup-sda.dd.gz"
Why sending the whole stuff over the wire to compress only afterwards?
Ok, one reason could be the box to be backed up hadn't enough processing resources currently.
But is wasting bandwidth really the better choice?
How about doing the compression first?
Code:
dd if=/dev/sda | gzip -c9 | rsh remuser@remhost 'cat >whateveryoulike.gz'

But dd maybe isn't the best of coices, and if so one should possibly try a bigger than default block size.
On non-Linux systems I usually would go for the dump/restore siblings of the used filesystem type. But Linux's dump/restore I think was notorious for being broken (but maybe not anymore?)
If the disk or single partitions of it weren't almost fully used up
you can really speed things up by using one of those clonefs* tools which come with distros like Insert (have forgotten their exact name)
because they would only copy actually allocated blocks.
# 6  
Old 08-11-2008
Excellent point... But I typically use this when directly connected anyway, via crossover cable. And the PC im connecting to is typicaly alot faster. So network traffic is not an issue in that case. But compression BEFORE the copy would make more sense in network connected machines.

Quote:
Originally Posted by buffoonix
Why sending the whole stuff over the wire to compress only afterwards?
Ok, one reason could be the box to be backed up hadn't enough processing resources currently.
But is wasting bandwidth really the better choice?
How about doing the compression first?
Code:
dd if=/dev/sda | gzip -c9 | rsh remuser@remhost 'cat >whateveryoulike.gz'

# 7  
Old 08-12-2008
parted is another good option.
well, its actually a ncurses front end for dd y [bg]zip with some nice extra options
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
Login or Register to Ask a Question