[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 623
  • Last Modified:

Backup Partition Command

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
Gnustome
Asked:
Gnustome
3 Solutions
 
svenkarlsenCommented:
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
 
yuzhCommented:
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
 
GnustomeAuthor Commented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
paullamhkgCommented:
0
 
svenkarlsenCommented:
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
 
GnustomeAuthor Commented:
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
 
svenkarlsenCommented:
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
 
GnustomeAuthor Commented:
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
 
svenkarlsenCommented:
Sorry Gnustome,

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


;-\

Sven
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now