Ext3 to NTFS - transfering data


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Ext3 to NTFS - transfering data
# 1  
Old 10-27-2010
Ext3 to NTFS - transfering data

Alright so here is my problem:
I have an ext3 external hard drive with about 270gb of data that needs to be copied/transferred to a NTFS drive.
The NTFS drive has data currently on it...which obviously needs to stay intact.
My supervisor mentioned that this problem could be a little tricky so I just have a few things i'm wondering to see if I can find the right direction to go.
I'm assuming that simply mounting the NTFS drive and moving the files to the corresponding /mnt drive would serve no purpose...or would possibly not be allowed?
Should I be thinking about creating an ext3 partition on the NTFS drive to copy my data to?
based on what i've been doing recently I am assuming that my supervisor wants me to use this method:
gather the files in the ext3 drive with tar, compress those files using gzip, then move the files to the NTFS drive, uncompress, and extract.
just as a quick example i am assuming that this:
Code:
tar cf - /dev/sdb1/scott | tar -C /dev/sdc1/ -xf -

or something similar would not work, otherwise my supervisor would not have said this was tricky. (Note: sdb1 is the ext3 drive and sdc1 is the NTFS drive)

plus, since my supervisor recently had me learning about mount and fdisk I am guessing that I may be needing to use these commands. I'm just not exactly sure what is possible and what is not allowed in this case(as far as Linux goes)
# 2  
Old 10-27-2010
I guess you mount the ntfs to /somewhere/ (an existing, empty directory) and "cp -p" your data files, or "cp -rp" your directories and their subtrees, into an appropriate directory on /somewhere/.
# 3  
Old 10-27-2010
but would those files actually be saved to the hard drive once the drive is unmounted? or can you only view and access files that are mounted and not necessarily edit or add to them?
# 4  
Old 10-27-2010
Quote:
Originally Posted by huntreilly25
Alright so here is my problem:
I have an ext3 external hard drive with about 270gb of data that needs to be copied/transferred to a NTFS drive.
The NTFS drive has data currently on it...which obviously needs to stay intact.
My supervisor mentioned that this problem could be a little tricky so I just have a few things i'm wondering to see if I can find the right direction to go.
I'm assuming that simply mounting the NTFS drive and moving the files to the corresponding /mnt drive would serve no purpose...or would possibly not be allowed?
Should I be thinking about creating an ext3 partition on the NTFS drive to copy my data to?
based on what i've been doing recently I am assuming that my supervisor wants me to use this method:
gather the files in the ext3 drive with tar, compress those files using gzip, then move the files to the NTFS drive, uncompress, and extract.
just as a quick example i am assuming that this:
Code:
tar cf - /dev/sdb1/scott | tar -C /dev/sdc1/ -xf -

or something similar would not work, otherwise my supervisor would not have said this was tricky. (Note: sdb1 is the ext3 drive and sdc1 is the NTFS drive)

plus, since my supervisor recently had me learning about mount and fdisk I am guessing that I may be needing to use these commands. I'm just not exactly sure what is possible and what is not allowed in this case(as far as Linux goes)
This would work as it is, so long you have additional spaces in your NTFS drive to accomodate ext3 drives data; assuming you have this, just try the sequence of commands only (ofcourse, its trickey but not that much you are assuming -you will have the correct data in your NTFS drive Smilie :

Code:
]# mkdir /mnt/ext ; mkdir /mnt/ntfs
]# mount -t ext3 /dev/sdb1 /mnt/ext
]# mount -t ntfs /dev/sdc1 /mnt/ntfs
]# mkdir /mnt/ntfs/ext3_data
]# cp -xR /mnt/ext/* /mnt/ntfs/ext3_data/
]# sync
]# umount /mnt/ntfs ; umount /mnt/ext

Your data will be properly copied into the ext3_data directory under the ntfs drive; ofcourse the conversion of data format from ext3 to ntfs would be handled by the corresponding filesystems kernel modules. What you'd, get at the end, -your pure data uncorrupted Smilie

You may also chose to copy of the entire ext3 disk image onto your ntfs drive too, use the following:

Code:
]# mkdir /mnt/ntfs
]# mount -t ntfs /dev/sdc1 /mnt/ntfs
]# mkdir /mnt/ntfs/ext_data
]# dd if=/dev/sdb1 of=/mnt/ntfs/ext_data/ext3.img bs=512 count=<size_of_data> / 512

Here with the count flag takes an argument as a number you get as a divide the total ext3 drive's capacity to 512.

At the end, what you get is not the pure data rather its a disk copy as a backup onto your ntfs drive, this disk image is a file which would be saved as an ntfs file over the ntfs drive. In this case, to get your data, you need to do the following:
Code:
]# mount -o loop -t ext3 /mnt/ntfs/ext_data/ext3.img /mnt/ext

Here you can access your data inside the /mnt/ext directory.

Cheers!!!
This User Gave Thanks to Praveen_218 For This Post:
# 5  
Old 10-27-2010
k , i found simply using piped tar commands works, example:
Code:
tar cf - /mnt/ext/data/ | tar -C /mnt/ntfs/ -xf -

However, takes forever because, after all, I am trying to transfer around 270gb.
If I were to pipe through gzip and then gunzip is there an argument (like the -C in tar) where I can tell gunzip to uncompress in a specific directory?
# 6  
Old 10-27-2010
Well, 270 gb takes a while to write, no free lunch. You could leave it compressed and write less, if you can figure how to access it on the other side -- zip files suggest themselves, being explorable, windows having compressed folders and with files clickable to open.

cp -rp to a mount would do a cpio pass for you. If the mount is over the network, it would be even slower!

With SAMBA, you can leave the data in place and let them access it on UNIX.

Solaris has a neat ClientFS that is nfs with local caching on hard disk. You start off a little slow, but then all the files re-accessed are on the local hard drive. Ditto for local mods flowing back to the NFS volume. They do not recommend high writes, but it looks like you could turn off updates during the day and then turn them on later for bulk updating.

Plan9 OS from AT&T Belll Labs had hierarchical storage, where every hard drive was a cache for the optical WORM. Never had to ask people to clean their dirs again.
# 7  
Old 11-03-2010
Praveen,
just got around to taking a look at what you wrote and it's been very helpful!
Thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Errors received while restoring my data from ext3 filesystem

Hi All, I have dual boot on my laptop - Win8 And linuxMint. From linuxmint i had copied all my data found on the NTFS partitions (on my laptop) to an external hard drive (formatted with ext3). i used rsync for this. Now after my hard disk crashed, am restoring the data back from ext3... (2 Replies)
Discussion started by: coolatt
2 Replies

2. UNIX for Dummies Questions & Answers

Data files on AIX to NTFS Drive

How can I copy a data disk on an AIX system to a Windows readable format (0 Replies)
Discussion started by: Phill
0 Replies

3. Red Hat

CentOS and XP dualboot + ext3/ntfs mount

I have WinXP Pro SP2 on first disk /dev/hda, which my BIOS currently has as first boot device. I have CentOS-5.2-x86_64 on second disk /dev/hdb, which I can boot into if I set my BIOS to boot from this HDD. It is using LVM with vg00 and a single LV for root (/) filesystem (ext3). How do I get... (19 Replies)
Discussion started by: apra143
19 Replies

4. UNIX for Dummies Questions & Answers

transfering a directory to the toolman

I have a question about transferring a directory to the toolman. I have a directory called assn3 that contains two txt files and one empty directory and I want to transfer the assn3 to my my tooman account. Every time I try to transfer the file it says that the assn3 is not a regular file! what... (3 Replies)
Discussion started by: aama100
3 Replies

5. BSD

Mounting ext3 & NTFS on PC-BSD!!

I'm having problem mounting ext3 & ntfs partitions on my PC-BSD OS. Can anyone please help me out here. What are the changes required to be done in fstab?? Are there any patches to be installed?? (1 Reply)
Discussion started by: void_man()
1 Replies

6. Filesystems, Disks and Memory

Transfering size between partitions

Below is a list of the file system on my Sun system. How can I transfer more disk space from the "/space" partition to the "/" partition with out rebuilding? / /dev/dsk/c0t0d0 6191949 5736718 393312 94% /proc /proc 0 0 0 0% /dev/fd fd 0 0 0 0% /etc/mntta ... (10 Replies)
Discussion started by: meyersp
10 Replies

7. UNIX for Dummies Questions & Answers

Transfering files from one server to another.

My oracle database is generating archive logs. I want to copy those archive logs over to backup server on a regular basis. I know how to create an ftp job and I can put it in my crontab. My problem is that I don't know how to send the files just once instead of sends all the files in the... (4 Replies)
Discussion started by: Alan Bird
4 Replies

8. UNIX for Dummies Questions & Answers

Transfering files

Hi all. 1. How can i copy files from one unix system to another. should i use ftp? so How? 2. How can i create an archive whose extention is tar.gz? and how can i decompress them later? 3. WHat is RPM ? what does it stands for? Thanks (5 Replies)
Discussion started by: vbs
5 Replies

9. UNIX for Dummies Questions & Answers

Transfering a window to another screen

Dear Experts I am using a workstatin with two screens and its OS is solaris 8. I wish to trnsfer some application windows from one screen to another one without need to closing the window and open it from other screen. Please advise Bests Reza (3 Replies)
Discussion started by: Reza Nazarian
3 Replies
Login or Register to Ask a Question