Avatar billede Rune Sommer Mester
16. juni 2007 - 14:54 Der er 1 kommentar og
1 løsning

partimage gemmes til en specific partition - hvordan gøres det

Jeg har Ubuntu Linux på in bærbare og jeg er ret ny i denne linux-verden. Derfor vil jeg gerne have muligheden for at lege med systemet uden igen og igen at skulle re-installere forfra.

Jeg har fundet et program til at lave partitionsbackupper med - der læner sig meget op af Norton Ghost: partimage.

Nu har jeg så både forsøgt i kommandolinjen og med GUI'en at lave en backup. Men hvergang den starter, skriver den, at jeg kun har 354MiB til rådighed til at lave backuppen på - på trods af, at jeg har 5GB fri både på mit drev der skal backuppes og på det drev, jeg ønsker at backuppen skal over på.
Dette er i sig selv lidt underligt, da jeg blot forsøger at tage backup af en frisk installation på ca. 2gb.


Men et andet spørgsmål er:
Hvordan får jeg programmet til at forstå, at jeg gerne vil have, at backup-filen bliver lagt over på en anden partition?

Backup af /dev/sda3  skal backuppes på /dev/sda6

den kommando som jeg skriver hedder:

partimage -z2 -f0 save /dev/sda3 /mnt/backup/ubuntu01


Gode råd modtages gerne. Hvis der evt. er en anden bulletproof måde at lave en partitionsbackup på, er jeg også lydhør overfor dette.


Jeg HAR dog forsøgt at sætte mig ind i hvordan man laver en backup direkte fra terminalen hvor man ekskluderer forskellige mapper. Men problemet med denne type backup (for mig) er, at når jeg skal restore backuppen igen, så overskriver den ikke hele partitionen. Den efterlader blot de ting jeg sidst har rodet med.
Så at sige: filer jeg for nyligt har rodet med = Y
Filer på backuppen er = X.

Jeg ønsker, at når jeg har restored en backup, at computeren så KUN indeholder X-filer. Men pt. når jeg restorer fra terminalen har jeg både X og Y filer liggende. hvilket giver en masse rod.
Avatar billede Rune Sommer Mester
17. juni 2007 - 13:22 #1
Hi.

I have the Dell latitude X1 with Ubuntu Feisty-Fawn installed.
I'm pretty new to the Linux-stuff and i would like to play a lot with different stuff.
But when something goes wrong it would be nice to have a system-restore-backup i could overwrite my partition (where the os is installed) and start from that point again.
I have now re-installed Ubuntu 7 times because i messed Emacs up and NTFS-3g support and my fstab-file and some other stuff i just don't know how to repair.

Therefore i have searched google for some days now (yes - days!) and found several backup-programs. And some friends just told me to do it from the Terminal....

1.
I have now tried to backup from the terminal - with success. But when i restored my backup, i found that it didn't overwrite everything on my partition. E.g. the newest files i had om my computer (and desktop) is called "Y", and the files on my backup file is called "X". I messed up some of the Y-files and wanted to restore my system with everything (including my home-folder) so my computer after the restore only contained "X-files".
But to my suprise it mixed both the Y- and the X-files - which ended up in a mess!

The goal was to just have X-files and get totally rid of the Y-files.

2.
I have tried the program called "partimage". Allmost with success. I wrote in the text-menu:
partimage -z0 -f0 save /dev/sda3 /mnt/backup/ubuntu7.04-01

and it started to backup my partition. But from the beginning it told me, that there only was 450MiB free to the image. (i have 5,5GiB free on the partition and i just made a backup of a new ubuntu-install hence ~2GiB). There should be plenty of space to make a backup-file.

If i could make program backup my sda3 partition to the sda6 partition there wold be 40GiB free space.
But i can't figure out how to make it backup on another partition?!


Can someone help me with either 1. or 2. ? If both - then i will be wery happy
06-16-2007 01:04 PM
   
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1    
Options           Options    
hotshotDJ
Bronze
Posts: 102
Registered: 05-02-2007

hotshotDJ

Message 2 of 9

Viewed 67 times
   
    As far as #1 is concerned, you haven't really provided enough information -- in other words, I haven't a clue what your talking about.

As far as #2 -- are you trying to backup a partition that is in use (mounted)? You should not try to make an image of a mounted partition. Trouble and heartache will be the primary result. You may have better luck using a simple liveCD for this task. My current favorite is SystemRescueCD. It has many system maintenance tools, including partimage. You boot up to that, then mount the partition to which you want to WRITE your backup image. (Read the referenced web site's documentation to make sure you get it right... while SystemRescueCD is a very powerful tool, there is not a lot of hand-holding with it.)
06-16-2007 01:31 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1    
Options           Options    
Thorun
Bronze
Posts: 13
Registered: 05-27-2007

Thorun

Message 3 of 9

Viewed 64 times
   
    #1
Hehe. It's kind of difficult to explain. But I followed the guide on page 1 / first post in this link:

http://ubuntuforums.org/showthread.php?t=35087

And i made the backup-part without problems.
But when i had to restore my backup (because i made a mess on my system), the code provided in the link didn't erase my sda3 partition (which is the one with my Linux-installation on it). The backup just "added" the backup files to my system.
Hence my new files and my backup-files was mixed in a big pile of "new-and-old-stuff".
Even some shortcuts to installed programs (i did install after i created the backup-file) was still on my desktop after i restored the backup-file.

(This way of backupping is mainly used to backup servers i think - but how they restore their systems on crashes/failures i have no idea - whis is my question in deed)


#2
I have just made this SystemRescueCD and tried to make a backup with the partimage program.
But i have no idea which devices that is mounted or not. I thought (sort of) that all my drives were mounted when i booted up with the RescueCd(?!).

But what you're telling me is, that none of the partitions is mountet from "default" - and I definitely should NOT make an image of a mounted partition.
Then I should mouht the drive ( the /dev/sda6 ) partition for storing my image i will make from the un-mounted /dev/sda3 partition.


I'll give it another shot to see if i can succeed to make an image of the un-mounted sda3.
06-16-2007 02:01 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1  [ Edited ]    
Options           Options    
Thorun
Bronze
Posts: 13
Registered: 05-27-2007

Thorun

Message 4 of 9

Viewed 55 times
   
    #2
Backup-making in progress....And it was a success!

My approch is as follows:

1. Boot up on the RescueCD
2. type: fdisk -l to see, what/where i want to store my backup.
3. type: mkdir /mnt/ubuntux to make a directory in the dir where to i can mount the partition to where i will save my backup.
4. Mount the partition to where i want to save my backup-file:
mount -t ext3 /dev/hda6 /mnt/ubuntux
5. Now type: partimage - this will start the Partition Image program
6. Choose which device to backup. Press Tab.
7. Type the folder where to store the backup-image (which is in the just mounted folder/partition): /mnt/ubuntux/.gz
8. Chose compression --> start image-making.
Wait 30 minutes...

Done (hopefully)



Edit:
At the same line as "Data Copied": SC appears to be running slowly. Marking it as unstable. ?! What's that suppose to mean.
I just chose the bzip2 method.

Message Edited by Thorun on 06-16-2007 02:52 PM



Now I have restarted Ubuntu again and looked for the backup-file.
It was not placed in the folder i created called ubuntuxx - but the file is located in the root of /sda6/ and is called backup02.bz.000 and file type is "unknown".
Hence it's not a bzip2 file and i cannot open it.

I will now try to make some changes and restore the backup-file to se, if everything is allright.
But do i have to mount the partition/filesystem where to read the backup-file from? And how can i find the filename if i forget it?


(most of this conversation is minded on myself - just to remember what i did )

Message Edited by Thorun on 06-16-2007 03:16 PM
06-16-2007 02:51 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1    
Options           Options    
hotshotDJ
Bronze
Posts: 102
Registered: 05-02-2007

hotshotDJ

Message 5 of 9

Viewed 42 times
   
    Once you reboot from SystemRescueCD to your regular system, the directory you created (/mnt/ubuntux) is gone. As you discovered, the file was written directly to the device and it will appear in /path/to/mountpoint

You're not supposed to be able to open the file you created. You will use the same proceedure to restore the partition from the backup. Boot up SystemRescueCD, mount the partition that contains the backup image, and then tell partimage to restore the partition using the image.

If you forget the filename?? Well... Don't DO that.
06-16-2007 03:29 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1    
Options           Options    
Thorun
Bronze
Posts: 13
Registered: 05-27-2007

Thorun

Message 6 of 9

Viewed 40 times
   
    Yay. I found a way to remember the filename.

I can open startx - the GUI-mode. In there I can have 2 terminal-windows open. The one can mount the partition/filesystem that contains the backup. And when mounted, i can cd my way into the filesystem and look at the files.

I just tried to restore with the option to write zeros at empty space (to erase what could be left on the partition that i'm restoring to) but at 60% it told me to point at file ... ARGH... the same now without the "write zeros option"...

Now I'm told to point at file name backup.bz.001 (the original file was called backup.bz.000) to continue the backup-restore. But there is no file with *.001-extension. And the operation is canceled.... ;-(
06-16-2007 03:55 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1    
Options           Options    
hotshotDJ
Bronze
Posts: 102
Registered: 05-02-2007

hotshotDJ

Message 7 of 9

Viewed 33 times
   
   

    Thorun wrote:
    Now I'm told to point at file name backup.bz.001 (the original file was called backup.bz.000) to continue the backup-restore. But there is no file with *.001-extension. And the operation is canceled....


Hmmmm... are you SURE about that? If I recall correctly, partimage on SystemRescueCD defaults to splitting files into CD or DVD size. I needed to manually tell it to just make one large file until it runs out of room on the backup drive.

OH... I should have mentioned this before... I use the following pattern every time I make a backup so I never mess up: YYYYMMDD-Backup-$PART -- So, if I wanted to backup my root partition today, the file would be: 20070616-Backup-Root.000
06-16-2007 04:38 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1  [ Edited ]    
Options           Options    
Thorun
Bronze
Posts: 13
Registered: 05-27-2007

Thorun

Message 8 of 9

Viewed 26 times
   
    Yeah - i'm pretty sure about the *.001 stuff.
But this backup was made with the "split at 2000MiB option".

Now i have just installed Ubuntu from scratch (for hopefully last time) and made a new backup with the option "use all the space before part" and gzipped it (the one in the middle).
Now I will make som changes and try to restore my backup to see, if it goes back to "scratch-install" again

I think that I've got the catch of it. It's a matter of trying several times making backups and restoring to get it to work as i want to - without errors.

Nowhere in any Howto partimage guide it says anything about mounting the device where you want to store the backup file. Maybe It's common knowledge for experienced Linux users but for Linux-noobs as myself it's hard to figure out. For me atleast
Thankyou for giving me the clue in your first reply.


Message Edited by Thorun on 06-16-2007 05:59 PM

I have just made my first successfull backup + restore. Next time i will try with the "write zeroes to empty space" option.
But now i can make backups! I'm truly happy. Have been searching for this in 1½ week now.
The next question (yeah, there is allways some more questions..) is: can partimage backup the WindowsXP-partition where the drive is formatted to NTFS? (without compression as that one is still experimental).

Well - that's maybe not nescesary at all - if i just choose to run WinXP in a VMWare server..... which might could be my next project

Message Edited by Thorun on 06-16-2007 06:00 PM
06-16-2007 05:28 PM
   
    Mark Message as New    
    Add This Message to My Favorites    
    Add This Message to My Notifications    
    Subscribe to this message's RSS Feed    
    Highlight This Message    
    Print This Message    
    E-Mail this Message to a Friend    
    Report Abuse to a Moderator    
   
      Reply           Reply    
   
    Re: partimage won't backup my partition on my Dell Latitude X1    
Options           Options    
hotshotDJ
Bronze
Posts: 102
Registered: 05-02-2007

hotshotDJ

Message 9 of 9

Viewed 17 times
   
    According to the partimage web site, NTFS is not fully supported. You can try to experiment with it, but I wouldn't rely on partimage for your NTFS partition. I think I agree with your idea of using a virtual machine. In that department, my current favorite is Virtual Box. On the download page, make sure you scroll down to the part where it tells you how to add the VirtualBox repository to Ubuntu Feisty. It will make your life much easier.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester