Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-26-2006, 02:09 AM
|
#1
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Rep:
|
How do i , backup data? Resize partition
Hey all,
I have a dillema where by i have installed ubuntu onto this machine and it has taken all 80GB of my HDD. I a preparing to put Slackware 10.1 back on here and would like to 1) backup the current system & 2) resize the partition to 40GB(ext3) + 40GB(ext3)
I have only sucessfully backed up my system using 'partimage' before. I beleive if i make an imge on a 80GB volume i cannot restore it back to a 40GB one.. Is this correct? If so this is not the option for me this time
I have resized partitions using many programs including the nice GUI of G/QTParted...
Last time i resized a partition that had a linux system on it, it was not very happy at all and the system would not boot anymore afterwards..
questions: 1) Is it safe to resize/create new linux partition/s in Gparted whilst there is a system currently on the disk ?
2) what are my other options for backup other than partimage ? What is the the command to simply tarball the entire partition..??
** Really all i want to do is backup my system/create the desired partitioning (above) and then Install Slackware and restore backed up system... Any help would be appreciated 
Ive stuffed up too may times so wanna get it right this time 
Last edited by -=Graz=-; 05-26-2006 at 02:12 AM.
|
|
|
05-26-2006, 02:32 AM
|
#2
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Quote:
Originally Posted by -=Graz=-
Hey all,
I have a dillema where by i have installed ubuntu onto this machine and it has taken all 80GB of my HDD. I a preparing to put Slackware 10.1 back on here and would like to 1) backup the current system & 2) resize the partition to 40GB(ext3) + 40GB(ext3)
I have only sucessfully backed up my system using 'partimage' before. I beleive if i make an imge on a 80GB volume i cannot restore it back to a 40GB one.. Is this correct? If so this is not the option for me this time
I have resized partitions using many programs including the nice GUI of G/QTParted...
Last time i resized a partition that had a linux system on it, it was not very happy at all and the system would not boot anymore afterwards..
questions: 1) Is it safe to resize/create new linux partition/s in Gparted whilst there is a system currently on the disk ?
2) what are my other options for backup other than partimage ? What is the the command to simply tarball the entire partition..??
** Really all i want to do is backup my system/create the desired partitioning (above) and then Install Slackware and restore backed up system... Any help would be appreciated 
Ive stuffed up too may times so wanna get it right this time 
|
I think I recall your other thread and I think some mistakes were made during resizing. It would be easier if you had a second drive but if not you'll have to split the tar amongst several CDs if it's too large to fit on one.
The last time I checked, it was indeed true that partimage does not allow you to restore into a smaller partition even if your filesystem was smaller than the partition.
Depending on how many partitions you have, this is very simple to accomplish.
1- boot a live CD and mount its /tmp on the /tmp of your ubuntu system. we do this step because the cd burner will need space to work.
2- tar the root (of your real system, not the live CD!) using bzip2 (-cj switches) and exclude /tmp from the tar (I would tell you how to do this but last time I tried it goofed and did tmp anyway, so someone else should help)
3- burn the tar to a cd or cds as required by the size of the tar file
4- check the tar to make sure it's good by using tar -t and anything else you can do (although tar and bzip are reliable)
5- fdisk or cfdisk the drive to your liking
6- make an ext3 filesystem in the partition for ubuntu
7- untar ubuntu back into its place
8- boot ubuntu and make sure it works
9- install Slackware into its partition
|
|
|
05-26-2006, 02:49 AM
|
#3
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I used tar to produce a backup of a dvd image and a very large directory onto an externel usb harddrive. Since the tar files would exceed the 2GB limit for filesize, I piped the output of the tar command to the split command to break up tar. ( Note: a huge tarfile was never created ). I used a slice size of 200MB. Then I used par2 to create parity files incase some of the files became damaged.
It is possible to restore straight from the USB drive this way:
cat /media/usbdrive/basename.tar.gz.??? | tar xvzf -
|
|
|
05-26-2006, 03:08 AM
|
#4
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Hey thanks for the info mate!
I love this forum!! ..
Okay all makes sense an i have a gentoo live CD here that i can do all this on...
Yes, it was me that made a similar post last time.. hehe..
.
|
|
|
05-26-2006, 03:28 AM
|
#5
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Actually, i have not used this 'bzip2' before.. I cannot see switch -J ? Only -c is available..
also, im not quite sure about mounting the /tmp of the live CD on the /tmp of my ubuntu system..
Whilst using the CD i can mount the entire /dev/hda1 to /mnt/temp1 (which im sure is not what you mean)
I have a 4GB USB laptop drive in a caddy which might suffice instead of using CD's -
I might go have a read about bzip2 and come back if i have problems.. Thanks again! 
|
|
|
05-26-2006, 03:51 AM
|
#6
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Quote:
Originally Posted by -=Graz=-
Actually, i have not used this 'bzip2' before.. I cannot see switch -J ? Only -c is available..
also, im not quite sure about mounting the /tmp of the live CD on the /tmp of my ubuntu system..
Whilst using the CD i can mount the entire /dev/hda1 to /mnt/temp1 (which im sure is not what you mean)
I have a 4GB USB laptop drive in a caddy which might suffice instead of using CD's -
I might go have a read about bzip2 and come back if i have problems.. Thanks again! 
|
it's lower case j, not upper case J. Do man tar and look for -j, I have it on my man page for GNU tar, perhaps your distro isn't using that version. Bzip2 offers the most compression of the normal compression apps.
I meant to do
rm -r /tmp from the live CD's filesystem
mkdir /tmp
mount /tmp /dev/hdan/tmp
What we are trying to do is to use the /tmp from your existing installation as /tmp for your live CD because the /tmp on the live CD isn't going to be big enough to make a big tar or burn CDs. It's very nice that you have the 4G drive. If that's big enough, then disregard what I wrote earlier about /tmp since I didn't see from your post that you had another drive.
Instead, just tar your root filesystem directly onto your backup drive with bzip2. If you have other partitions make sure to tar them as well.
|
|
|
05-26-2006, 06:33 AM
|
#7
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Ahhh okay - makes sense...
The 4GB drive may be enough once the backup is compressed... (i forgot to mention i had this drive)
So after creating the backup i should use the command line to burn to CD/DVDR (if i choose to use discs) ?
I had better check the man page for bzip2 - when doing 'bzip2 --help' however it did not list the -j for some reason...
Ill be back 
Last edited by -=Graz=-; 05-26-2006 at 06:47 AM.
|
|
|
05-26-2006, 06:57 AM
|
#8
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
I just checked the man page for bzip2 - there is no -j or -J in my version =)
What are the best switches to use if i was to tarball the entire partition? Is this an option??
I thought i could just make a series of say 4 x 1GB .tar files and back these up to the drive or burn to DVD ..
What would i type to tar all of /dev/hda1 to either the virtual system on the CD or directly back to /dev/hda1/something ??
can this be done??
Maybe i should just update bzip2 to a newer version... It looks very powerful from the man page.
|
|
|
05-26-2006, 10:31 AM
|
#9
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
tar -cjf mywholesystem.tar.bz2 /
|
|
|
05-26-2006, 10:32 AM
|
#10
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Quote:
Originally Posted by -=Graz=-
Ahhh okay - makes sense...
The 4GB drive may be enough once the backup is compressed... (i forgot to mention i had this drive)
So after creating the backup i should use the command line to burn to CD/DVDR (if i choose to use discs) ?
I had better check the man page for bzip2 - when doing 'bzip2 --help' however it did not list the -j for some reason...
Ill be back 
|
j is not a switch for bzip2; it's a switch for tar to tell it to use bzip2
|
|
|
05-27-2006, 11:23 PM
|
#11
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Oh my... looking through my post i really was sick yesterday 
Have had the flu the last few days.... a bit more with it today though ..lol
stll having some issues though i think
I have booted live CD.
cd /
rm -r /tmp
mkdir tmp
mount /dev/hda1 /tmp -t ext3 (i cannot obvuisly mount straight to /tmp on the ubuntu system... just the divice/fs)
cd /tmp
tar -cjf systembackup.tar.bz2 /tmp/ --exclude=systembackup.tar.bz2
Now if i 'alt-f2' i can see in /tmp the new file is being created... which is in / of the other system.
problem is after it gets to about 3GB in size it starts spitting out errors about 'permission denied' when trying to open files in the /sys directory
there is nothing in this area untill the system is booted anyway...
|
|
|
05-28-2006, 01:58 AM
|
#12
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Okay this thread can be marked resolved now - i have been doing a bit of reading and found out about the errors i was receiving...
Managed to get a nice backup by simply excluding /mnt /sys and the backupfile.tar.bz2
All is looking rosy for the re-install of Slackware! YES! 
|
|
|
05-28-2006, 03:55 AM
|
#13
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Glad to hear you have it working!
|
|
|
All times are GMT -5. The time now is 04:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|