Just wanna give a clue how to rsync between freenas server
first, you need atleast 2 freenas server, one as freenas source and other as freenas target
to make it simple, use the same user login and password, because we need to access it using ssh
this is the example using rsync
rsync -arvz --exclude-from=/mnt/vol/itd/itmgr/exclude.txt --log-file=/mnt/vol/itd/itmgr/log/dutamas-`date '+%Y%m%d_%H%M%S'`.log --no-perms --no-owner --no-group --delete --progress fda:/mnt/freenas/ /mnt/vol/dutamas/
- rsync is the apps
- -arvz is the parameter that connect it
- –exclude-from= is excluding file
- –log-file= is the log file while sync the server
- –no-perms is ignoring permission
- –no-owner is ignoring owner
- –no-group is ignoring the group owner
- –delete is delete the file if the sync server is not same
- –progress is showing the sync progress
- fda:/mnt/freenas is server source
- /mnt/vol/dutamas is server destination
question! what is fda
fda is a mapping host, we can create the file on ~/.ssh/config below is the sample file
Host fda HostName 192.168.60.17 IdentityFile ~/.ssh/itmgr_rsa User root Host fta HostName 192.168.70.3 IdentityFile ~/.ssh/itmgr_rsa User root Host fsa HostName 192.168.5.7 IdentityFile ~/.ssh/itmgr_rsa User root
we do have 3 source server, fda, fta and fsa, we defined the host name, and we also defined the identity file, because we do not want to type password each synchronizing . and finally we use user root to access each source server