Backing up a system
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Backing up a system




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Backing up a system  
Rafael Almeida


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-15-06 12:21 AM

Hello,

I have a computer with a 1.2GB root directory (let's call it dib). I
want to back it all up, but before that I need to somehow copy it all to
a computer that has a dvd burner. What would be the best way to do it? I
don't want to have to open the computers and connect the hd of one of
them on the other's motherboard, I have a network connection with the
other computer and I want to use that. I only have one partition on the
dib computer, here is the output of df -h:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc2             2.9G  1.2G  1.7G  41% /
/dev/hdb              663M  663M     0 100% /mnt/cdrom

So I have enough space on the dib to have all the data backed up, I
thought about taring the whole thing and sending the tar throught
the network, but I'm unsure if tar will copy everything nicely. I've
heard people talking about some issue with tar and symlinks, I couldn't
remember what it is or figure it out by myself. So I thought I should
ask here if that which I'm about to do looks safe. The command I want to
do is:

tar cvzf backup.tar.gz /

Thanks for the attention





[ Post a follow-up to this message ]



    Re: Backing up a system  
Stefaan A Eeckels


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-15-06 12:21 AM

On Mon, 14 Aug 2006 20:12:37 -0300
Rafael Almeida <rafaelc@dcc.ufmg.br> wrote:

> So I have enough space on the dib to have all the data backed up, I
> thought about taring the whole thing and sending the tar throught
> the network, but I'm unsure if tar will copy everything nicely. I've
> heard people talking about some issue with tar and symlinks, I
> couldn't remember what it is or figure it out by myself. So I thought
> I should ask here if that which I'm about to do looks safe. The
> command I want to do is:
>=20
> tar cvzf backup.tar.gz /

You don't want to use absolute path names in the tar file.

Actually, you could consider using star (J=F6rg Schilling's superior
version of tar) and rmt to backup directly to the remote tape drive. It
will save you a lot of hassles.

To backup your root filesystem to the remote device you'd issue:

# cd /
# star -cM fs=3D128m bs=3D63k f=3Dtape@remotehost:/dev/rmt/0bn .

There's a bit more to it (like setting up the "tape" user), but it's
all nicely covered in the star man page. You can find star at this URL:
http://cdrecord.berlios.de/old/private/star.html

Take care,

--=20
Stefaan A Eeckels
--=20
One of the greatest delusions in the world is the hope that the evils=20
in this world are to be cured by legislation.          -- Thomas Reed





[ Post a follow-up to this message ]



    Re: Backing up a system  
Logan Shaw


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-15-06 06:25 AM

Rafael Almeida wrote:
> I have a computer with a 1.2GB root directory (let's call it dib). I
> want to back it all up, but before that I need to somehow copy it all to
> a computer that has a dvd burner. What would be the best way to do it?

Depends on the filesystem and the version of Unix.

Backup programs support various things, and filesystems (both the
on-disk filesystem, and the virtual filesystem and its API) support
various things as well.  What each one supports may not exactly
line up with what another one supports.

For example, on Solaris, the ufs filesystem and the API both support
ACLs, but the "tar" command doesn't support them.  Most people don't
use ACLs, so they could back up a ufs filesystem using tar without
running into problems, but others do use ACLs and would lose information
when backing up some other filesystem.

To give a different kind of example, Solaris also has a utility called
"ufsdump" which backs up data and which supports all the features of
the ufs filesystem, so it should be able to make a backup without
losing information.

Other filesystems and operating systems and backup tools will have
other relationships.  Some tools will be able to back up everything
without losing information, and some won't.

So, in order to be sure about the answer to your question, it would
be best to know more about what operating system you're on, what
filesystem type you have for the root filesystem, etc.

By the way, one tool that is almost sure not to lose any data
(provided it is lucky enough to get a correct backup, which isn't
guaranteed) is "dd".  You can just run "dd if=/dev/hdc2" and pipe
or redirect that to a file.  You might not get a backup of the
filesystem in a consistent state, but if you do, you won't have
lost any information.

- Logan





[ Post a follow-up to this message ]



    Re: Backing up a system  
Rafael Almeida


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-15-06 06:25 AM

On Tue, 15 Aug 2006 01:57:09 GMT
Logan Shaw <lshaw-usenet@austin.rr.com> wrote:

> Rafael Almeida wrote: 
>
> Depends on the filesystem and the version of Unix.
>
<snip>
> To give a different kind of example, Solaris also has a utility called
> "ufsdump" which backs up data and which supports all the features of
> the ufs filesystem, so it should be able to make a backup without
> losing information.
>
I'm using a linux 2.4.32 with reiserfs. I'm thinking on using that star
tool that Stefaan told me about here on comp.unix.admin. I want to
change to the netbsd 3 so, if everything goes as planed, a few /etc
files and the /home will be the only things I'll need to use from the
backup. Still, I want a full backup just to make sure.

For doing a filesystem dump I think I should be able to umount the
partition, which isn't my case. I plan to close as most running
applications as I can and use star, I think it should be safe enough for
what I need.

Thank you guys for your help.





[ Post a follow-up to this message ]



    Re: Backing up a system  
Tim Skirvin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-16-06 12:20 AM

Rafael Almeida <rafaelc@dcc.ufmg.br> writes:

> So I have enough space on the dib to have all the data backed up, I
> thought about taring the whole thing and sending the tar throught
> the network, but I'm unsure if tar will copy everything nicely. I've
> heard people talking about some issue with tar and symlinks, I couldn't
> remember what it is or figure it out by myself. So I thought I should
> ask here if that which I'm about to do looks safe. The command I want to
> do is:

How I'm generally doing tar backups lately, on Solaris:

Local Tape Drive
================

/usr/sbin/fssnap -F ufs -o raw,bs=/etc/backup/backup,unlink /
/usr/sfw/bin/gtar -b 512 -Mv -C /mnt/gtar_backup -cf /dev/rmt/0cbn .
/usr/sbin/fssnap -d /


Remote Tape Drive
=================

On the server with the tape drive:

ssh root@$SYSTEM /usr/local/bin/snapshot.gtar / \
| dd of=/dev/rmt/0cbn obs=256k


...where that script runs, in essence:

/usr/sbin/fssnap -F ufs -o raw,bs=/Backup/snapshots,unlink /
mount -F ufs -o ro /dev/test /mnt/gtar_backup
/usr/sfw/bin/gtar -b 512 -M -C /mnt/gtar_backup -cf - .
umount -f /mnt/gtar_backup
/usr/sbin/fssnap -F ufs -d / > /dev/null 2>&1

- Tim Skirvin (tskirvin@ks.uiuc.edu)
--
Theoretical and Computational    http://www.ks.uiuc.edu/~tskirvin/
Biophysics, Beckman Institute, UIUC    Senior Systems Administrator





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:37 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register