Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How does one sync folders between two Linux boxes. When you mount a ext2 partition on a Linux box using cifs. There are problems with files names with : in the name. There are problems with uppercase and lower case filenames.
I used cp -rp to copy files from one system to the other system. When I did this I ended up with more files on the destination system than was on the source system. Most of these additional files were found in the terminfo folders where the p files were also copied to the P folder.
Not what kind of utility or script to verify if the copy ended up with the correct files. When you try to run a script the script has the same problem with the uppercase and lowercase filenames.
How is this normally handled?
Between two linux boxes, I don't use cifs. I use nfs, rsync or maybe sftp/sshfs depending on my needs.
I do have a Synology NAS box and not real cheap once you include the drives but I bought it just because it does nfs and a ton of other stuff.
While the DNS-323 runs linux and many commerical NAS devices do, the cheaper devices really only cater to Windows clients and may provide an Apple service. For file sharing it is typically only cifs or ftp.
A quick search did find where the DNS 323 had a nfs add on package but that it was a bit buggy. I don't know if it is still available for download.
I backup my Windows to linux boxes but to their own directory so illegal characters or mixed cases is not a problem.
My problem started because I wanted to create a backup of my DNS323. So I started cp -rp of the folders on the NAS to the Linux PC.
When I noticed some problems I started trying to verify the copied. But not matter what I did I ended up having problems trying to do the verify.
I've been looking into the nfs option. I'm almost ready to take the drives out of the NAS and mount them in the Linux box to get
a good backup. Most of the data on the NAS does not need to be constantly backup. There are only a few folders that my need to be
sync'd on a regular basis.
Like I said I have the nfs for the DNS323 just not sure if it is the latest. Dlink no longer seems to have the DNS323 online any more.
+1 to NFS, all I've ever used between Linux boxes. Nfs-kernel-server is installed on all my Linux installations. NFS works transparently, has been very stable, and is simpler to setup than CIFS. CIFS seems to be constantly changing, apparently full of the bugs that comprise Windows. I use CIFS mainly with OS/2, occasionally with MacOS, rarely with Windows. Usually when using Windows I unplug the ethernet cable, unless I'm allowing it to update.
I agree NFS would be a better choice. But not all Linux installations have NFS. My installation is a busybox installation and to does not come with NFS. There is an add-on
for NFS but not sure if I have the latest code. I would agree that busybox is not a standard Linux installation.
The nfs add on may not be the latest but since the NAS is no longer supported you don't have a choice.
Your only other option which is not recommended is using ftp. It isn't secure where traffic is not encrypted and passwords are sent in plain text but all the obvious restrictions with cifs are gone. lftp is a good ftp client and has a mirror option which work for your needs if this is just your home local LAN. I will probably get severely chastised for mentioning ftp.
The NAS is an embedded device that uses a single board computer which has limited RAM and storage capabilities. I have a few SBCs that run busybox.
Between two linux boxes, I don't use cifs. I use nfs, rsync or maybe sftp/sshfs depending on my needs.
I do have a Synology NAS box and not real cheap once you include the drives but I bought it just because it does nfs and a ton of other stuff.
While the DNS-323 runs linux and many commerical NAS devices do, the cheaper devices really only cater to Windows clients and may provide an Apple service. For file sharing it is typically only cifs or ftp.
A quick search did find where the DNS 323 had a nfs add on package but that it was a bit buggy. I don't know if it is still available for download.
I backup my Windows to linux boxes but to their own directory so illegal characters or mixed cases is not a problem.
A quick search gave me this for using rsync over ssh to turn an old box into storage backup. It would seem to me to be the best solution to get the OPs idea done. It will ensure the files are exactly the same on any box synced with it using rsync.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.