Solved

Backup Partition Command

Posted on 2003-11-09
9
584 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 9

Expert Comment

by:svenkarlsen
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry Gnustome,

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


;-\

Sven
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

11 Experts available now in Live!

Get 1:1 Help Now