Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: globalsi on February 25, 2015, 12:33:09 PM

Title: [BYPASSED] rsync backup and colon(:)
Post by: globalsi 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.
Title: Re: rsync backup and colon(:)
Post by: Stefano on February 25, 2015, 12:41:33 PM
globalsi

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

TIA
Title: Re: rsync backup and colon(:)
Post by: globalsi 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 :)

Title: Re: rsync backup and colon(:)
Post by: Daniel B. 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
Title: Re: rsync backup and colon(:)
Post by: globalsi 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.
Title: Re: rsync backup and colon(:)
Post by: Stefano 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?
Title: Re: rsync backup and colon(:)
Post by: globalsi 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).


Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: Stefano 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
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: globalsi 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...?
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: Stefano 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 :-)
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: CharlieBrady 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.
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: janet 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.
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: globalsi 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
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: globalsi 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.
Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: Jáder 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.

Title: Re: [BYPASSED] rsync backup and colon(:)
Post by: globalsi on February 27, 2015, 11:37:41 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.

Finally I done it.
That's what I explained Reply #6.