0
0
I am trying to backup data from one external harddrive to another using cp and/or rsync on a Mac.
The external drives given by diskutil list
are:
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *1.0 TB disk2
1: Apple_HFS Transcend 1.0 TB disk2s1
/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *1.0 TB disk3
1: Windows_NTFS Seagate Backup Plus ... 1.0 TB disk3s1
They have been mounted on /Volumes/Transcend/
and /Volumes/Seagate
respectively.
cp -R ebooks/ /Volumes/Transcend/ebooks/
after running for sometime yields the following errors:
cp: ebooks//中國敦煌學百年文庫: unable to copy extended attributes to /Volumes/Transcend/ebooks/中國敦煌學百年文庫: Device not configured
cp: ebooks//中國敦煌學百年文庫: Device not configured
cp: ebooks//中國明朝檔案總彙: unable to copy extended attributes to /Volumes/Transcend/ebooks/中國明朝檔案總彙: Device not configured
rsync
throws up the same error:
$ rsync -r ebooks/ /Volumes/Transcend/ebooks/
rsync: link_stat "ebooks/." failed: Permission denied (13)
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/main.c(996) [sender=2.6.9]
$ sudo rsync -r ebooks/ /Volumes/Transcend/ebooks/
Password:
rsync: link_stat "/Volumes/Seagate/ebooks/." failed: Device not configured (6)
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/main.c(996) [sender=2.6.9]
How else can I complete my backup from here? (It is less than 50% complete.)
UPDATE:
Some instances of Device not configured (6)
error are apparently caused by the NTFS volume being unmounted halfway through the rsync
process.
After running chkdsk
on the NTFS volume with a Win7 machine, which fixed some disk errors, I can easily mount the volume using ntfs-3g
.
rsync
nonetheless runs into the following error after working for some time:
三編第092冊/000732.pdg": Device not configured (6)
rsync: send_files failed to open "/Volumes/Seagate/ebooks/叢書集成三編/叢書集成三編第092冊/000733.pdg": Device not configured (6)
rsync: send_files failed to open "/Volumes/Seagate/ebooks/叢書集成三編/叢書集成三編第092冊/000734.pdg": Device not configured (6)
I modified my rsync
command so that it can continue from where it left off after such disruptions.
rsync -avhP --iconv=utf-8,utf8-MAC --stats --progress --info=progress2 /Volumes/Seagate/ebooks/ /Volumes/Transcend/ebooks
One thing I've noticed is that ntfs-3g
automatically unmounts the Seagate volume while rsync is still running, giving rise to the above error.
I've been able to get rsync
running again by remounting the Seagate volume with sudo ntfs-3g /dev/disk3s1/ /Volume/Seagate/
.
So the next question would be: Why can't ntfs-3g
keep the drive mounted until the whole rsync
process is complete? Is there a bug somewhere, or did I miss something in my command?
Well, you cannot copy files to the Seagate volume as macOS doesn't natively support writing to NTFS shares. You'd need to reformat it as HFS. That said, you should be able to write to the Trascend volume. – MMB – 2019-02-15T07:06:30.933
Where is the "ebooks" folder that you're copying from? Is it an attached device or a local filesystem? – MMB – 2019-02-15T07:15:41.807
@MMB, I am trying to backup the ebooks folder on the Seagate NTFS volume to the Transcend HFS volume. The NTFS drive can be successfully mounted via
ntfs-3g
– Sati – 2019-02-15T11:39:37.9771macOS has native support to read NTFS, so you don't need to use
ntfs-3g
just to read. Perhaps, try the copy using the default macOS mounting capabilities? Beyond that, I think the next step would be to look at the individual filenames and compare the ones that have worked vs the ones that don't. – MMB – 2019-02-16T03:38:47.310@MMB, The problem has been resolved by using Mac native support for NTFS read-only access:
$ sudo mount -t ntfs /dev/disk2s1 /Volumes/Seagate
– Sati – 2019-02-17T08:17:03.120Even with programs like
ntfs-3g
, Mac support for NTFS read-write capabilities seems to be unstable. – Sati – 2019-02-17T10:03:40.047