View previous topic :: View next topic |
Author |
Message |
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Sun Jun 09, 2019 8:36 am Post subject: rsync vs nfs4 |
|
|
Greetings,
I have a folder on server 1 which I want to backup on server 2, server 1 has it exported via nfsv4
I've found old disscussions regarding the issue stating that for file transfer,. rsync is better than nfs.
I wonder if it is still the case nowadays and when using nfsv4
can anyone comment on this? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3949
|
Posted: Sun Jun 09, 2019 11:43 am Post subject: |
|
|
Nfs is not used for backing up folders -- just for sharing folders over a network which then a client would mount and use as if they were local to that machine.
What you CAN do is mount the nfs folder and then just copy it to some other directory,tar it or whatever you like.
OR
Just use rsync over ssh:
Code: |
rsync -avz -e ssh root@<remote-host>:</path/to/remote/directory> </path/to/local/directory>
|
It goes without saying that ssh key authentication is prefered.
|
|
Back to top |
|
|
C5ace Guru
Joined: 23 Dec 2013 Posts: 489 Location: Brisbane, Australia
|
Posted: Sun Jun 09, 2019 11:56 am Post subject: |
|
|
I use both.
Desktop-1 user "A" and a number of laptops users "B", "C" , etc. connect with NFS to folder-1/user "A", "B", etc on server-1.
Folder-1 and subfolders on server-1 are backed up daily to /home/backup on desktop-1 using rsnapshot (rsync). _________________ Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5941
|
Posted: Sun Jun 09, 2019 2:15 pm Post subject: |
|
|
thanks, I'll try using nfsv4. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Sun Jun 09, 2019 11:04 pm Post subject: |
|
|
DaggyStyle,
rsync can be much faster, especially if you have many small files:
- On my NFS server:
Code: | cd /tmp
time cp -a /usr/portage .
4.3 seconds # first run
2.4 seconds # second run, it's faster because data is in cache |
On my NFS client (/usr/portage is mounted from NFS server, GigabitEthernet link):
Code: | cd /tmp
time cp -a /usr/portage .
191 seconds # first run
188 seconds # second run, no difference |
On my NFS client (connected to NFS server via GigabitEthernet link):
Code: | cd /tmp
time rsync -a <user>@<IP address of NFS server>:/usr/portage .
2,8 seconds # first run
2,7 seconds # second run, no difference |
3 seconds instead of 190 seconds... That's much better, isn't it? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|