zafiro17
Dabbler
- Joined
- Sep 14, 2014
- Messages
- 13
All - I've been running BSD servers and desktops for 14 years and have even contributed to documentation on occasion. But I'm stumped here. I'm running FreeNAS 9.2-RELEASE on dedicated hardware, an iXsystems miniNAS (lovely little box), with all data on volume /mnt/sharkstuff/...
I'd like a cron script that mounts an external USB harddrive that I've plugged into the USB port, and rsyncs a bunch of data to it. Once I know the script works I'll let cron do its work, but for now rsync is giving me trouble. It's backing up 90% of my data, but skipping any file with foreign characters in it, and my music has quite a bit of that. Here's the little script:
So, every Sunday I plug in the USB drive, sudo mkdir /mnt/external, and then run the script: sudo ./bkup-my-crap.sh
The mount isn't giving me any trouble, it's a FAT32 drive formatted under Windows (I don't want to format it as UFS or anything else because the purpose of the drive is to give me access to a copy of my stuff from other (Windows, Linux, Mac) machines as FAT32 is the lowest common denominator. And I don't need time stamps or ownership/groups to be preserved (therefore: --no-o and --no-g options on rsync).
I can't figure out how to get rsync to read the files with accented characters. The FreeNAS box is UTF-8 and every machine to which it serves files is able to read access and modify those files with no problem. But rsync barfs with errors like this one:
That's a dotfile with an umlaut in it.
Not sure if the trouble is in mounting the FAT32 file system? I've had no luck with any version of
mount_msdosfs -L utf-8 so I think the problem is rsync. rsync is version 3.0.9 protocol level 30, which is supposed to be able to do --iconv translations when necessary, but I'm not convinced that's the solution.
Any ideas? Am I barking up the wrong tree?
I'd like a cron script that mounts an external USB harddrive that I've plugged into the USB port, and rsyncs a bunch of data to it. Once I know the script works I'll let cron do its work, but for now rsync is giving me trouble. It's backing up 90% of my data, but skipping any file with foreign characters in it, and my music has quite a bit of that. Here's the little script:
Code:
#!/bin/sh mount_msdosfs -o large /dev/da1s1 /mnt/external rsync -av --no-o --no-g /mnt/sharkstuff/randymon /mnt/external 2> rmonbkup-error.log umount /mnt/external
So, every Sunday I plug in the USB drive, sudo mkdir /mnt/external, and then run the script: sudo ./bkup-my-crap.sh
The mount isn't giving me any trouble, it's a FAT32 drive formatted under Windows (I don't want to format it as UFS or anything else because the purpose of the drive is to give me access to a copy of my stuff from other (Windows, Linux, Mac) machines as FAT32 is the lowest common denominator. And I don't need time stamps or ownership/groups to be preserved (therefore: --no-o and --no-g options on rsync).
I can't figure out how to get rsync to read the files with accented characters. The FreeNAS box is UTF-8 and every machine to which it serves files is able to read access and modify those files with no problem. But rsync barfs with errors like this one:
Code:
rsync: recv_generator: failed to stat "/mnt/external/Documents/Budingen/._Bu\#314\#210dingen.pdf": Invalid argument (22)
That's a dotfile with an umlaut in it.
Not sure if the trouble is in mounting the FAT32 file system? I've had no luck with any version of
mount_msdosfs -L utf-8 so I think the problem is rsync. rsync is version 3.0.9 protocol level 30, which is supposed to be able to do --iconv translations when necessary, but I'm not convinced that's the solution.
Any ideas? Am I barking up the wrong tree?