Linux Gurus: I want to copy my entire Linux partition to my windows machine.. How?

Crimson

Banned
Oct 11, 1999
3,809
0
0
I am currently running Mandrake 8, and I am going to be installing Mandrake 8.2 shortly. What I want to do is copy my ENTIRE Linux partition (I have everyone on one partition) over to my Windows machine. Whats the best way to do that? Login as root, mount a drive on my windows machine and just copy it over? What would be the command line to do that? I don't need help getting Samba set up, or anything like that.. thats all working.. Just need to know what the correct command line is to do it, or if there would be a better way. I essentially just want a backup of all the files in case I need to put any back after I upgrade..
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The only thing you should copy is /home, that's where all your account preferances will be.

And I would do that with 'tar cfvjp /home /mnt/windows/home.tar.bz2'
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
There are 2 ways I can think of at the moment:

The linux method:
1. Mount your windows partition in Linux. This, of course, only works on FAT and NTFS 1.1 (NT4) filesystems.
2. cp -R /home /etc /var /root /windows_partition_mount_point
3. Unmount your windows partition and reboot into windows, and confirm the files have been copied.

The windows method:
1. Download explore2fs. Needless to say, it only works on ext2 and ext3 filesystems.
2. Copy the /home, /etc, /var, and /root directories to some place on your HD.
 

Crimson

Banned
Oct 11, 1999
3,809
0
0
Nothingman - I want all the config files as well.. so I want to copy everything to make sure i don't miss any of them.. IE /etc
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So tar up /etc too.

Just DO NOT use cp, especially if you decide to do the whole system, otherwise all your permissions will be lost along with all the symlinks, which will make everything take up a lot more space and be a lot less secure.
 

Crimson

Banned
Oct 11, 1999
3,809
0
0
I should have clarified.. the windows machine is NOT the same machine as the Linux machine (ie, they don't reside on the same hard drive).. But I think I figured it out.. I mounted a folder of the windows machine on the Linux machine (smbmount), then used the copy -R command to copy files over.. No FS compatibility problems to worry about since SMB is handling it.
 

Crimson

Banned
Oct 11, 1999
3,809
0
0
I'm not really concerned with space or permissions.. I just want the files put somewhere so I can refer to them when I reinstall.. IE, remember what I had in my /etc/hosts file..
 

thornc

Golden Member
Nov 29, 2000
1,011
0
0
As monkey says your best bet it to use tar! This way you'll keep a complete backup of the file structure!
symbolic links, permissions, etc...
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Tar works fine. I use an extra, small linux installation on an extra drive to make backups, but you could do it with a boot disk too. Just mount your linux partition somewhere, say /mnt/tmp. Cd to mount, then "tar cpf [outputfile] tmp". Specify a location for the output file wherever you have the space for it.
 

Apatewnas

Member
Mar 31, 2002
57
0
0
...or you could use ghost (disk to partition, partition to partition whatever) and boot the backup linux from floppy on the secondary machine.