Koozali.org: home of the SME Server

[BYPASSED] rsync backup and colon(:)

Offline globalsi

  • *****
  • 167
  • +0/-0
[BYPASSED] rsync backup and colon(:)
« on: February 25, 2015, 12:33:09 PM »
Hi,

I have a problem to backup some files on my SME server.
I use rsync between my server and a cifs mount share.

All works usually but some files broke the process : files with colon ( : )
These files are email, created by SME :

Code: [Select]
[root@svrmail ~]# ls -ls  /home/e-smith/Maildir/cur/
total 3284
  4 -rw------- 1 admin admin    671 janv. 12 13:54 1421067296.3748.svrmail:2,
  4 -rw------- 1 admin admin    671 janv. 12 14:34 1421069653.4726.svrmail:2,
  4 -rw------- 1 admin admin    671 janv. 12 15:07 1421071627.3571.svrmail:2,
  4 -rw------- 1 admin admin    671 janv. 12 15:40 1421073608.3640.svrmail:2,
  4 -rw------- 1 admin admin    683 janv. 12 16:24 1421076275.3637.svrmail:2,
  4 -rw------- 1 admin admin    728 janv. 17 00:13 1421449984.21333.svrmail:2,
  4 -rw------- 1 admin admin    861 janv. 18 04:02 1421550141.28533.svrmail:2,
252 -rw------- 1 admin admin 253219 janv. 20 21:01 1421784084.8358.svrmail:2,
  4 -rw------- 1 admin admin    582 janv. 21 04:47 1421812069.10685.svrmail:2,
296 -rw------- 1 admin admin 295083 janv. 21 21:01 1421870490.27824.svrmail:2,
  4 -rw------- 1 admin admin    582 janv. 22 04:38 1421897884.30306.svrmail:2,
328 -rw------- 1 admin admin 330997 janv. 22 21:01 1421956915.19154.svrmail:2,
  4 -rw------- 1 admin admin    582 janv. 23 04:17 1421983023.21232.svrmail:2,
368 -rw------- 1 admin admin 370997 janv. 23 21:02 1422043343.7985.svrmail:2,
...

or

Code: [Select]
[root@svrmail ~]# ls -ls  /home/e-smith/files/users/my.username/Maildir/cur/
total 176624
  220 -rw------- 1 my.username my.username   220806 janv. 13 12:49 1421149772.7507.svrmail:2,S
   12 -rw------- 1 my.username my.username    11409 janv. 13 14:17 1421155037.8480.svrmail:2,S
   32 -rw------- 1 my.username my.username    30307 janv. 13 14:37 1421156232.9218.svrmail:2,S
...

Can we ask SME to not create files dot instead of colon or semicolon or coma...?
Or how can I use ssh with this files ?

Thank for your help.
« Last Edit: February 26, 2015, 11:50:57 AM by globalsi »

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: rsync backup and colon(:)
« Reply #1 on: February 25, 2015, 12:41:33 PM »
globalsi

first of all, what are you trying to achieve?
how? (the exact syntax)
why?

TIA

Offline globalsi

  • *****
  • 167
  • +0/-0
Re: rsync backup and colon(:)
« Reply #2 on: February 25, 2015, 01:50:16 PM »
I want to backup emails of my server with versionning and easy restore.

I run this code every night :
Code: [Select]
/sbin/mount.cifs $IP_DISK_BACKUP $MOUNT_POINT -o credentials=/root/.smbcredentials,iocharset=iso8859-15 >> $LOG_FILE
/usr/bin/rsync -azh --stats --delete --backup --backup-dir=$FOLDER_HIST_DAY/ $FOLDER_ORIG $MOUNT_POINT/ >> $LOG_FILE
/bin/umount $MOUNT_POINT

IP_DISK_BACKUP, MOUNT_POINT, FOLDER_ORIG and FOLDER_HIST_DAY are variable defined in my script (for example : IP_DISK_BACKUP="//192.168.1.1/share")

Is it ok for you ?

TIA too :)


Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: rsync backup and colon(:)
« Reply #3 on: February 25, 2015, 02:09:22 PM »
I use rsync to backup those files with a colon without an issue (through BackupPC). In which way the process is "broken" ? What error message do you have
C'est la fin du monde !!! :lol:

Offline globalsi

  • *****
  • 167
  • +0/-0
Re: rsync backup and colon(:)
« Reply #4 on: February 25, 2015, 07:16:47 PM »
I think the problem come from cifs.
I have no problem with ssh between 2 servers without using cifs mount share.


The error is : the script is "as frozen" : nothing happen :  no more log, no more cpu consummation... I must kill it manually.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: rsync backup and colon(:)
« Reply #5 on: February 25, 2015, 07:28:00 PM »
just try to create, on the target machine, a file having the same structure/characters..

cifs share is on another linux machine or a windows one?

Offline globalsi

  • *****
  • 167
  • +0/-0
Re: rsync backup and colon(:)
« Reply #6 on: February 26, 2015, 11:47:59 AM »
Hi, it's a NAS (Fujitus Q700).

Finally, I've managed to establish a ssh connection between SME and the NAS with a key authentification.
So, I can rsync without a cifs share -> no more problem with colon.

The problem is bypassed (not solved).



Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #7 on: February 26, 2015, 12:01:45 PM »
did you try to create a file on the target machine (on a cifs share) with a colon in filename?

I just tried and it doesn't work..

a little digging with google using "cifs filename colon" gives me many results.. it's not supported AFAICT

Offline globalsi

  • *****
  • 167
  • +0/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #8 on: February 26, 2015, 12:22:02 PM »
a little digging with google using "cifs filename colon" gives me many results.. it's not supported AFAICT

Yes, this why I asked if SME could not create files with colon or semicolon or coma...?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #9 on: February 26, 2015, 12:34:22 PM »
Yes, this why I asked if SME could not create files with colon or semicolon or coma...?

this is not a SME's issue :-)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #10 on: February 26, 2015, 04:28:38 PM »
Yes, this why I asked if SME could not create files with colon or semicolon or coma...?

No, it's a standard part of the maildir format.

cifs is broken. Avoid it.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #11 on: February 26, 2015, 04:55:32 PM »
globalsi

Maybe you can tar or zip your data files into one archive, & then rsync the differences between the new archive on the server & the archive on your backup server/location/cifs mount.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline globalsi

  • *****
  • 167
  • +0/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #12 on: February 26, 2015, 05:11:08 PM »
No, it's a standard part of the maildir format.

cifs is broken. Avoid it.

ok, thank you

Offline globalsi

  • *****
  • 167
  • +0/-0
Re: [BYPASSED] rsync backup and colon(:)
« Reply #13 on: February 26, 2015, 05:12:52 PM »
globalsi

Maybe you can tar or zip your data files into one archive, & then rsync the differences between the new archive on the server & the archive on your backup server/location/cifs mount.
It's a possibility. thank you.
However, I've managed to solve it with full ssh.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
Re: [BYPASSED] rsync backup and colon(:)
« Reply #14 on: February 27, 2015, 11:21:37 AM »
If you're using RSYNC why you need mount as CIFS ? Cannot you use pure SSH after enable it on web interface ?
I read spec here: http://www.ingrammicro.at/pdf/077TL01.pdf
And they include SSH and SFTP.

...