Solved

Backup Partition Command

Posted on 2003-11-09
9
590 Views
Last Modified: 2013-12-16
I am running Debian 2.4.18.  I have only one Linux partition on a HD with Windows partitions.  Is there a command I can use to backup the entire Linux partition to a mounted Windows partition?
0
Comment
Question by:Gnustome
9 Comments
 
LVL 9

Accepted Solution

by:
svenkarlsen earned 200 total points
ID: 9711811
Hi Gnustome,

Use tar. Make a backup strategy and don't just backup root, - leave out all the noise (/dev, /Lost+Found, /temp, and so on....).

Itll take you a couple of days to make a good set of working scripts, - some to use daily and some to use every week or forthnigth. After having made the scripts, test them.

When you think they are working, try restoring the contents to some other location, - your backup is worth nothing if you haven't tested that you can use them for restore.

Make symlinks from the scripts to your CRON-dirs, so you don't have to think about it any more after that.

You should read the man and HOWTO, but here's a little inspiration for some of it:

 (put this in a shell script):

# Name of the backup tar target dir where the backup is made

    TarTargetDir=[put your windows dir name here]

# Name of the backup source (what you want to back up)

    SourceDir=/


# The switches used in tar-call :
# a=append, c=create, W=verify, v=verbose, z=filter through gzip
# P=don't remove leading '/', - for backing-up dirs at root

    TarSw='czWP'


    # Tar the desired files, - output to a .....run.log:
        /bin/tar -$TarSw -f $TarTargetDir/backup.tar $SourceDir


Kind regards,
Sven
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 75 total points
ID: 9711853
Have a look at the following tools:

http://rdiff-backup.stanford.edu/

or you can use the following command

cpio
tar
dump

do a man on the above command to learn more

also:

http://oldlook.experts-exchange.com/Operating_Systems/Linux/Linux_Administration/Q_20689454.html

(PS: if you want to do regular backup rsync is another handy tool)
0
 

Author Comment

by:Gnustome
ID: 9712169
So if I just backup the important stuff and leave out all the noise, and I then experiment with a potentially dangerous procedure like enableing UDMA 100, and it backfires, could I boot from a floppy, restore from the backup, and be back up and running?
0
 
LVL 12

Assisted Solution

by:paullamhkg
paullamhkg earned 25 total points
ID: 9712490
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 9

Expert Comment

by:svenkarlsen
ID: 9712825
Gnustome,

> could I boot from a floppy, restore from the backup, and be back up and running?

things are not quite that simple, have a look at the link from Paul.


Sven
0
 

Author Comment

by:Gnustome
ID: 9715398
Sven, you are right: Things are not as simple as I first thought.  But my goal is this: In case of catastrophe, I want to restore everything to it's original condition.  So, assuming HD space and the number of CDs are not problems, couldn't I back up root.  Then if catastrophe occurs and my filesystem gets trashed, I could do a minimal install of Linux to the same partition to restore the partition structure, then detar and ungzip the backup file, and finally copy it to root?
0
 
LVL 9

Expert Comment

by:svenkarlsen
ID: 9715470
Gnustome,

yes, you can restore a backup from CD (again: have a look at the links above for the procedure). But remember to think about how you split the stuff up on your CD's, - you probably can't get it all down on one ;-)


Sven
0
 

Author Comment

by:Gnustome
ID: 9716585
Thanks.  But my real question is: Can I renew the file system by doing a minimal Linux install, thus running fdisk and format in the process, then copying the backup file to root?
0
 
LVL 9

Expert Comment

by:svenkarlsen
ID: 9717041
Sorry Gnustome,

it's against my policy to make so absolute statements as the one you ask for.


;-\

Sven
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now