Openfiler, Freenas and RSYNC PDF Print E-mail
Thursday, 04 June 2009 14:13

To Openfiler From Another Machine (a Freenas server)

  1. In Freenas run the RSYNC service
  2. Goto Services > RSYNC > Server > Modules and create a module from the right directory
  3. Use ssh to log into your Openfiler box
  4. To query which modules are available (notice the double colon):
    # rsync freenas.yourdomain.com::
    DATA            MY DATA
  5. To rsync from the module (notice the double colon again)
    # rsync -avu freenas.yourdomain.com::DATA/* /mnt/vg_data01/data01/data/
  6. This one worked for me too(create the user first in Freenas)
    # rsync -avu This e-mail address is being protected from spambots. You need JavaScript enabled to view it :/mnt/DATA/* /mnt/vg_data01/data01/data

To a Freenas Server From Openfiler

  1. First create a module on Openfiler:
    # vi /etc/rsync.conf

    # PLEASE DO NOT MODIFY THIS CONFIGURATION FILE!
    #       This configuration file was autogenerated
    #       by Openfiler. Any manual changes will be overwritten
    #       Generated at: Sat Jun 6 0:32:09 CEST 2009

    port = 873
    motd file = /opt/openfiler/etc/rsync.motd
    address = 192.168.0.10

    # End of Openfiler configuration
    [data]
            comment = data
            path = /mnt/vg_data01/data01/data
            read only = no
            list = yes
            hosts allow = 192.168.0.0/24
            secrets file = /etc/rsyncd.secrets
            uid = nobody
            gid = nobody

    And then reload rsync:
    # service rsync reload
  2. Now you can schedule a RSYNC job in Freenas:
    Services > RSYNC > Client and create the job using the module name.
  3. Check the Freenas logs by going to:
    Diagnostics > Logs > RSYNC > Client

    So remember that this is for getting data TO freenas, not From Freenas to Openfiler. I thought it was the other way around and I lost 50GB of data before I was able to stop the process (by shutting down Freenas). Damn.
 

Add comment


Security code
Refresh

More KB Articles