Jump to content
Science Forums

Changing harddisk


sanctus

Recommended Posts

well the images can be copied onto any fs, at that point its a file ;)

 

yes, if you wanted to move your data to the external usb, you would need to create the partitions of the same or larger size. give them appropriate labels, then create a file system on the partitions and load the images over... its a bit of tedious work, but it works :) and teaches you more about how your system actually works :)

Link to comment
Share on other sites

Ok played around with it for the whole evening yesterday, but I did not get around the message "cannot create temporary file...make sure there is enough space and that you have the permissions"

The Faq says that the user doing in is called partimag so I did all variations of chown and chmod (like changing the owner of the external hd-partitions to partimag and/or chmod a=rwx sdb*). But still got the same message.

So I started to play around with mount, because I do not know if seeing my external hd partitions under /dev/sdb* (* is blanck space and 1 to 8) where I see also the main partitions sda* implies that they are mounted...

Errors I got while trying to mount is

-no rule in fstab

-umount then mount -a no effect.

-mount sdb1 /dev/ executed but still did not work afeterwards.

 

Also mtab does not have any sda* or sdb* anywhere but has things like sysfs (=systemfilesysten?) and tmpfs (=temporaryfilesystem?) but they are mounted elsewhere (one in /lib/firmware if I remember right, I am work with my laptop where I try to do this stuff at home).

 

Also, strangely or not (?), gparted worked with no problems on my external hd.

 

So any ideas? Shall I install partimage and then do it from the desktop where I can click on all the files to change permissions.

And also I did not write anything in fstab, but when I started my linux all the partitions (a part from the ntfs obviously) of my external hd where showing on the Desktop and where mounted...strange no?

Link to comment
Share on other sites

sanctus, the error message tells you that you dont have enough space on the disk you are trying to back that partition to. Generally that means that you forgot to mount the external drive and go into it's directory. To mount an external drive, run:

 

mkdir /mnt/external

mount /dev/sdb1 /mnt/external (substitute sdb1 with whichever partition on the whatever drive it happens to be, whether sda1 or sdd5 it is up to you to figure out which partition on which drive happens to be the external partition you want to use)

 

then just cd into /mnt/external, make a directory to work in, and cd into it and launch partimage ;)

Link to comment
Share on other sites

i actually tend to mount drives to /mnt/floppy, just because i have no other use for that directory.

 

Also you can use networked drives with partimage, it works the same way, you map it to a directory via smb, and then cd into that directory to create a backup. I think you dont understand that the environment that you boot to exists in your RAM, virtual hard drive can only be as big as your ram allows it, so you need another mounted media to back up your partitions.

But yeah, something like

 

ls /dev/sd*

mount /dev/sdb2 /mnt/floppy

cd !$

mkdir backup_12-08

cd !$

partimage

 

or if you are really 31337 that last line should be extended:

 

#lets see: back up the partition table

dd if=/dev/hda of=backup-hda.mbr count=1 bs=512

 

#back up extended partitions

sfdisk -d /dev/hda > backup-hda.sf

 

#lets back up the partition

partimage -z1 -o save /dev/hda1 /mnt/floppy/backup_12-08/hda1_backup.partimage.gz

 

#say we have 2 partitions

partimage -z1 -o save /dev/hda5 /mnt/floppy/backup_12-08/hda5_backup.partimage.gz

 

now, to restore it:

 

#restore partition table (works on the same size drive)

dd if=backup-hda.mbr of=/dev/hda

 

#restore extended partition table

sfdisk /dev/hda < backup-hda.sf

 

#restore first partition

partimage restore /dev/hda1 /mnt/floppy/backup_12-08/hda1_backup.partimage.gz

 

#restore second partition

partimage restore /dev/hda5 /mnt/floppy/backup_12-08/hda5_backup.partimage.gz

 

#restore mbr

partimage restmbr /mnt/floppy/backup_12-08/hda1_backup.partimage.gz

 

Link to comment
Share on other sites

Lol, I think I stick to your first version.

 

Anyway do I need to create a directory? Maybe thisis why it didn't work, because I assumed that /dev/sdb1/my_backup.partimag works since /dev/sdb1 exists. Making a directory seems to me just adding a few /s, i.e.:

suppose I have mounted /mnt/external1 (1 because it is the place where I want to back up sda1), isn't this equivalent to having created the directory /mnt/external1? Because if I cd there and make a new dir all I get is /mnt/external1/new_dir...right?

Link to comment
Share on other sites

nanana, dont confuse a device with a directory. /dev contains devices, in order to use a storage device, you need to mount it, /dev reference seves as the physical device reference, you need to mount it to your OS via the mount command, mount attaches to a device and provides file system call universal access.

 

thus mount /dev/sdb1 /mnt/floppy or any other location within the fs is needed before you can create folders or see them.

 

so first make a directory

then mount the partition in that directory

then go into the directory to see your files and folders, and you might want to create the directory, just so you know where backups are.

 

backing up the partition creates a file, so you can back up all the partitions into one folder on your external disk, or you could create separate folders, or you could use folders on different partitions, it's up to you, just realize that you create a file that is the snapshot of the partition you are trying to back up, but its a file that contains the data (in our case it is also compressed)

Link to comment
Share on other sites

  • 3 weeks later...

first of all, ghost is not a free piece of software, second of all images take space :lol: i mean using any backup software is great, i love time machine on mac, i love rsync and/or partimage on linux (i generally partimage a fresh install and then once every 3 months-year update the image (generally before making major changes)) and i rsync all the files to another machine, that way i can always restore at least 95% if not all the data... and since i tend to use darcs for code management, if something fails, i have if not the latest revision of code, at least one of the very late ones... I have used afbackup and i have heard some good things about bacula...

 

i also use a lot of different software for windows at work, none works quite as well as time machine, though ntbackup can be made work pretty well, CA makes a pretty bad product for backing up, if you are looking for enterprise, look at veritas, its quite a bit better IMHO, ntbackup tho, is still a nice, built-in solution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...