LinuxQuestions.org
Help answer threads with 0 replies.
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 06-13-2015, 07:30 PM   #1
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 744

Rep: Reputation: 156Reputation: 156
samba/rsync file names!


Hi, I am planning to migrate from Centos 6 to 7. Part of my plan is to, temporarily, store my samba shares on a raspberry Pi running wheezy. My main desktop is Fedora 22.

I now have shares on both Centos and the Pi and I mount both of these on the F22 box. Initially I used rsync/ssh on F22 from the Centos share directly to the Pi (ie. bypassing samba at the Pi end). abc is the existing share which I have been using for a while, nabc is the new share on the Pi.

Quote:
rsync -r -a -v -t -e ssh /mnt/abc/ "pi@176.145.1.62:/mnt/extend/sharing/nabc/"
all good. But that isn't what I wanted. I wanted to copy from one share to the other:

Quote:
rsync -r -a -v -t /mnt/abc/ /mnt/nabc/
This sort of works BUT all the files on the Pi are created with a \ in front of the name. Not what I was after. Any ideas why this is happening?

Cheers
 
Old 06-14-2015, 09:04 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I have no answer to your question, but why don't you just rsync the files from the Centos box to the Pi? No Samba needed for this.

Alternatively, on the F22:

cd /mnt/abc
find . | cpio -pdumva /mnt/nabc

(you may want to check whether other cpio options are needed)
 
1 members found this post helpful.
Old 06-15-2015, 03:50 AM   #3
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 744

Original Poster
Rep: Reputation: 156Reputation: 156
thanks. That does indeed copy the files across correctly. In spite of the -p option I lose the timestamps (which I would like) but this may be related to the ownership coming from groups set up on 2 different computers.

Ultimately I think the rsync suggestion will suffice.

regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] HowTo? Make rsync copy file names but not contents haertig Linux - Software 2 07-12-2014 04:05 PM
Case insensitive file names with samba for windows compatibility jan78 Linux - General 7 04-30-2014 02:36 AM
Samba share file/folder names ending in period Lenard Spencer Linux - Server 1 08-31-2010 09:14 AM
Can i limit new file names created to 8 characters with samba ? amitsharma_26 Linux - Networking 1 12-16-2005 05:42 AM
Korean File Names and Samba rzoster Linux - Software 0 04-13-2004 08:38 PM

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

All times are GMT -5. The time now is 11:20 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