LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 11-05-2020, 10:36 AM   #1
rac8006
Member
 
Registered: Oct 2014
Posts: 39

Rep: Reputation: Disabled
How to sync folders on a cifs mount


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?
 
Old 11-05-2020, 11:57 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,708

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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.
 
1 members found this post helpful.
Old 11-05-2020, 12:21 PM   #3
rac8006
Member
 
Registered: Oct 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
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.

Thanks for the response.
 
Old 11-05-2020, 01:36 PM   #4
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
+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.
 
Old 11-05-2020, 04:50 PM   #5
rac8006
Member
 
Registered: Oct 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
How to sync folders on a cifs mount

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.
 
Old 11-05-2020, 06:52 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,708

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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.
 
Old 11-05-2020, 07:54 PM   #7
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by michaelk View Post
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.

http://www.fatdex.net/php/2013/05/20...ckup-location/
 
Old 11-05-2020, 08:08 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,708

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
Looks like it should solve the ops problems.
.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 45 04-06-2020 05:31 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration