Samba share

Discussion in 'General' started by abukhazneh, Mar 8, 2010.

  1. abukhazneh

    Joined:
    Feb 10, 2009
    Messages:
    68
    Likes Received:
    0
    Hi

    I want to install samba on our PBX server and make a shared folder to have a backup copy of our recordings files on windows environment , daily at evening time a synchronization process will run to take the new files .
    I wish to know if this will affect the PBX server performance ??
     
  2. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    The more things you have on the server the more it would afect the performance. I don't think that Samba with one share would be too much. However it could be a security risk to share the backups or other files from the PBX id you don't do it carefully.

    What I would do is write an script in Elastix to copy the backups. This script should be run with cron every night or when you plan to do so. The destination could be a windows share file, and ftp, server, nfs, etc..... This way you don't run an extra service on Elastix, you don't share the backups directory and you can still backup to what ever you want.

    Regards,

    Rafael
     
  3. abukhazneh

    Joined:
    Feb 10, 2009
    Messages:
    68
    Likes Received:
    0
    Thnx a lot Rafael , but if you can give me an example of this script i will be so grateful .
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    I might suggest:
    Code:
    /bin/mkdir -p /mnt/scary && /bin/mount -t smbfs -o username=<windows_username>,password=<windows_password> //<windowbox>/<share> /mnt/scary && /usr/bin/rsync -at /var/spool/asterisk/monitor/ /mnt/scary ; /bin/umount /mnt/scary
    
    (that's a one liner, watch out for escaped slashes ) should meet all of Rafael's well considered warnings and your requirements

    dicko

    oh and you'll have to

    yum -y install rsync samba-client

    if you haven't already as Elastix mysteriously doesn't think rsync is useful and you need samba-client to talk to the hosts that are owned by the "Evil Empire" ;)

    (don;'t install the samba server unless you know what you are doing the protocol is just too "swiss cheese" )
     
  5. Chilling_Silence

    Joined:
    Sep 23, 2008
    Messages:
    488
    Likes Received:
    0
    Just keep in mind the potential for higher CPU usage with rsync.

    Wouldn't you be better off sharing via samba and then having the windows server manage the differentiation stuff? You could simply have the port restricted using iptables so it only accepts samba traffic from the server it'll be connecting with?
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Chilling Silence:

    Please expand, replicating into a winblows box will always be "not so efficient"

    Please let me know which form of replication you find less resourceful then rsync into a possibly huge smb file system locally mounted. ?

    I hope you aren't suggesting that the box server passively offers a share and lets MS eff it all up.

    dicko
     
  7. abukhazneh

    Joined:
    Feb 10, 2009
    Messages:
    68
    Likes Received:
    0
    For me here is my case :
    I will make the share on my PBX server , and from windows server a scheduled job will run daily at night time to copy the new recording files from the PBX to windows , there wont be resync service or crontab jobs in this , so no huge effort or cpu usage I think , unless adding the samba server itself makes a risk , is it a risk ????
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Yes, it's a risk, any service is a risk , particular anything as intrinsically insecure as smb, smb is not just file sharing but the whole slew of MS BS access rights and shares, that's why some recommend a transitory connection (as I did) but if you know what your doing go for it. If it bites you in the ass then don't whine later :) :)


    My suggested cron job did exactly what you suggest without relying on your windowboxes to do anything but what they are good at , subservience, and "I hope I get through next Wednesday" , :) you would have remained in charge, oh well whatever.

    If you think a pedestrian windows box can copy Xgigbits of data from you with less load on your server than a cron job running rsync can do (just the delta maybe a few percent of xgigibits (that's how rsync works)) then I think you misunderstand network file systems but so does Microsoft so don't sweat it.


    dicko
     
  9. abukhazneh

    Joined:
    Feb 10, 2009
    Messages:
    68
    Likes Received:
    0
  10. abukhazneh

    Joined:
    Feb 10, 2009
    Messages:
    68
    Likes Received:
    0
    OK , I have another thing to ask about , what if I applied online replication between my MYSQL server on the PBX and another MYSQL server , "Real time replication" will this also affect the performance ? Have any one tested that before ?? I will appreciate any help in this subject .
    Thanks in advance . :)
    Ala'
     
  11. abukhazneh

    Joined:
    Feb 10, 2009
    Messages:
    68
    Likes Received:
    0
    Another thing I want to ask about ... Does the rsync gives us a real time replication ?
     
  12. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
  13. n8

    n8

    Joined:
    Mar 10, 2011
    Messages:
    1
    Likes Received:
    0
    Has anyone installed samba on an elastix box? How could I put it on a box that has no direct internet access?
     
  14. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    Re: Re:Samba share

    yes it works as a charm in any linux system...try to google samba +config...you would find infinite tutorials and manuals...as your question is not elastix related
     

Share This Page