LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2008, 05:53 PM   #1
jogurnog
Member
 
Registered: Feb 2008
Distribution: Ubuntu 8.04, Slackware 12.1
Posts: 40

Rep: Reputation: 15
Unhappy howto backup


just need a quick 'HowTo' on backing up my entire ubuntu 7.10 programs and all
 
Old 03-17-2008, 06:30 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by jogurnog View Post

just need a quick 'HowTo' on backing up my entire ubuntu 7.10 programs and all
We need more information before we can answer the question.

Where are you going to store the backup, a disk partition, tape, CD, DVD, another machine on the network, a removable disk?

Do you have enough backup space to keep a mirror of your file tree or are you going to have to compress the backup to get it to fit into your backup space?

How often do you want to backup and do you want to keep multiple versions of your backup, assuming that you have enough backup space for multiple versions?

--------------------
Steve Stites
 
Old 03-17-2008, 06:39 PM   #3
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
You need a dvd burner and or another hdd, using the program dd.

(one option)
 
Old 03-17-2008, 11:09 PM   #4
jogurnog
Member
 
Registered: Feb 2008
Distribution: Ubuntu 8.04, Slackware 12.1
Posts: 40

Original Poster
Rep: Reputation: 15
it's not like in windows i could use a hard drive to back things up or use a command to make a back up that i could use for a restore ?
 
Old 03-17-2008, 11:51 PM   #5
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
In the Linux world, you have choices. There are many ways to do backup and restore. Some Linux distros have proprietary tools; all can use open source tools.

The oldes badkup tool I know of is tar. Tar has one problem that puts me off. A tar archive is monolithic (one large archive, even if it allows splitting, each split is monolithic) which means that if any part is corrupt, the entire tar archive is at risk.

I prefer Dar, which archives each file individually. If one file is corrupt, I risk only that one file, not the entire archive. Even in the event of corruption, Dar has a skip-ahead feature to skip over corrupt portions of a file. Hopefully, I have the necessary paperwork handy to be able to recreate the skipped-over portion of the file, or, if it's part of an application, I can refresh the installation to re-inatall the corrupt file.

It takes a bit of study and practice with the Dar Tutorial. But, once it is done, you will have a shell script for each partition of my hard drives, or a script for your entire installation if that is what you desire.

You can tell Dar whare to store the archive (just be careful that the storage partition is not included in the archive), so long as the storage partition is mounted when the backup is run. If you run the backup as root user, you can inslude the mount/umount commands in the script.

Dar will compress the archive (my own results are compresseion greater than 50%) meaning that the compressed archive is less than half the size of the uncompressed archive.

Dar inculdes a feature that allows you to test the archive to see what filesize is too small to be archived and compressed with space saving, meaning that files which are larger after archiving are flagged as larger than the original. With that information, you can set a file size limit on what will or will not be compressed.

The features of Dar are many and varied. You really must read the tutorial and go step by step in creating the script to do the backups, in order to appreciate the power of Dar.

Last edited by bigrigdriver; 03-18-2008 at 12:01 AM.
 
Old 03-17-2008, 11:52 PM   #6
jogurnog
Member
 
Registered: Feb 2008
Distribution: Ubuntu 8.04, Slackware 12.1
Posts: 40

Original Poster
Rep: Reputation: 15
jailbait, um a compressed backup would be nice, i have a second hard drive that's in my computer, so i have about 55GB extra space other than my vista partition and my regular space on ubuntu which is about 45GB left. um as for the tree stuff and what not, i don't know, i never really got into to that, but what ever will backup and store ubuntu the most efficiently.
 
Old 03-18-2008, 07:45 AM   #7
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Rep: Reputation: 30
one idea (might be too late if you have already set things up) is to have your /home mounted to a completely separate drive

that way if u ever screw up your system files and need a complete re-install, you still have all your documents/programs/mp3s etc intact on your /home

or you could write a .sh file for example to copy all your files to an external hard drive, or even another network drive and set this batch file to run every friday

J
 
Old 03-18-2008, 08:18 AM   #8
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
I need to polish this up and publish it somewhere I guess. It works for me. Have a look at my response to: http://www.linuxquestions.org/questi...ack-up-622481/

If you have any specific questions, please ask and I will update my cookery book documentation. I think I need to revisit the UUID issue/workaround. I was moving an install from one drive to another - actually trying to piece things together after I broke something - and got totally fouled up messing with the UUIDs. It was only a test install so I just rebuilt it from scratch.

Regards,

Ken
 
Old 03-18-2008, 08:53 AM   #9
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
You can use partimage to make up a image of your ubuntu linux system.

http://www.psychocats.net/ubuntu/partimage
 
Old 03-18-2008, 12:51 PM   #10
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by jogurnog View Post

jailbait, um a compressed backup would be nice, i have a second hard drive that's in my computer, so i have about 55GB extra space other than my vista partition and my regular space on ubuntu which is about 45GB left. um as for the tree stuff and what not, i don't know, i never really got into to that, but what ever will backup and store ubuntu the most efficiently.
If you have 55G available for backup space then you probably don't need compression. Compression has the disadvantage of making restore more complicated. You can check how much backup space you need with the du command.

du -s -h /

will tell you how much you have to backup. Assuming that you need to back up 25G or less I would recommend this way:

Partition your 55G of backup space into two equal size partitions using fdisk. Use mkfs.ext3 to format both of these partitions as ext3. Create two directories called /backup1 and /backup2. Then put entries in /etc/fstab so that the backup partitions are mounted as /backup1 and /backup2 every time you boot.

You can use this setup to keep backup two versions deep. You can backup to /backup1 today and backup to /backup2 tomorrrow and so on.

The best command to do the backup is cp with update mode:

cp -au / /backup1

cp -au / /backup2

When you need to restore a file you find the backup in /backup1 or /backup2 and copy it to /.

Using this method you will accumulate files in the backup which you truly intended to delete forever. Once a week or once a month you clean out one of your backup trees and start clean:

rm -r /backup1/*
cp -au / /backup1

and a week or month later do the same for /backup2.

All of the backups commands can be placed in cron so that your backups and cleanups are run automatically.

See the following man pages:

man cp
man du
man fdisk
man mkfs
man rm

------------------------
Steve Stites
 
Old 03-19-2008, 01:10 AM   #11
jogurnog
Member
 
Registered: Feb 2008
Distribution: Ubuntu 8.04, Slackware 12.1
Posts: 40

Original Poster
Rep: Reputation: 15
ok for some reason it's telling me 85GB which undoubtedly is wrong, cause when the partitions were made it was about 60GB~ more or less and i have about 44GB free, so i think it's read the media drives too, also i got recommended a program called 'keep' it's nice, it worked, but it worked the wrong way and ended having to delete a 37GB folder from the extra hard drive. if you could tell me how to do it correctly on 'keep' i'd like that a little more, sorry but your way seems a bit complicated.

Last edited by jogurnog; 03-19-2008 at 01:13 AM.
 
Old 03-19-2008, 01:22 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There is a front end to dar called kdar that works pretty slick. You can select the directories you want backed up and the filetypes and you can use compression for most files except for some filetypes that are already compressed. You can also set up a full backup or incremental backup job graphically and then export it to a shell script. That would allow you to perform backups automatically using a cron job.

I never heard of the "keep" program.

If you do use tar, look in the info manual. You can use timestamps files to create incremental backups.
 
Old 03-19-2008, 12:04 PM   #13
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by jogurnog View Post
ok for some reason it's telling me 85GB which undoubtedly is wrong, cause when the partitions were made it was about 60GB~ more or less and i have about 44GB free, so i think it's read the media drives too, also i got recommended a program called 'keep' it's nice, it worked, but it worked the wrong way and ended having to delete a 37GB folder from the extra hard drive. if you could tell me how to do it correctly on 'keep' i'd like that a little more, sorry but your way seems a bit complicated.
du has an option to skip directories on different file systems:

du -s -h -x /

------------------
Steve Stites
 
Old 03-20-2008, 09:13 PM   #14
jogurnog
Member
 
Registered: Feb 2008
Distribution: Ubuntu 8.04, Slackware 12.1
Posts: 40

Original Poster
Rep: Reputation: 15
hey jailbait, is there somewhere we could meet on IRC cause your way seems solid and i'd like someone to walk me through it.

please and thank you

-JUN
 
Old 03-21-2008, 03:31 PM   #15
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by jogurnog View Post
hey jailbait, is there somewhere we could meet on IRC cause your way seems solid and i'd like someone to walk me through it.

please and thank you

-JUN
I prefer to use LinuxQuestions so that the solution is available to everybody.

The first thing to do is to set up your backup partition. Use du to figure out how much you have to back up. Then decide how many versions of the backup you want to keep. Then use fdisk to create a partition more than large enough to keep that many versions of your full backup allowing for future growth (placing all versions of the backup in the same partition is a more flexible way to manage disk space than having a separate partition for each version of the backup). Format the new partition using mkfs.ext3

Create a mount point called backup:

mkdir /backup

Then create a line in /etc/fstab to mount /backup every time you boot.

Once you get that far then we can tackle creating the backup scripts.

-----------------------
Steve Stites
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto Backup 3.4 To Install 6.0? GNewbie MEPIS 2 07-28-2006 01:11 PM
howto backup & recover many pc's bucovaina78 Linux - General 6 01-22-2006 01:30 AM
cron & backup howto ? crispyleif Linux - Software 4 11-23-2005 12:26 PM
Howto disable backup file cration VertX Linux - Newbie 1 02-05-2005 05:56 AM
DVD backup: howto copy subtitle streams?? psychotron1 Linux - General 6 01-24-2005 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration