rsync nas drive to computer internal drive
by Davno from LinuxQuestions.org on (#6NCZ2)
Hi,
I used a rsync script to sync my linux drives to an USB external drives for years.
Code:if [ -f "/media/normand/29A0D72B224114DE"/usbmedia-mounted3 ]
then
rsync -t -r -h --delete --progress --partial-dir=DIR --stats /media/normand/5235256205C5426E/Musique "/media/normand/29A0D72B224114DE"
fiI am puzzled on how to modify that script to sync my new NAS drives (just some of the folders) to a USB external drive.
Something like this:
Code:if [ -f "/home/normand/Desktop/TEMP"/smb-mounted ]
then
rsync -t -r -h --delete --progress --partial-dir=DIR --stats smb://synology.local/homes/normand/Livres/GustavMahler/ "/home/normand/Desktop/TEMP"
fiWhen i run my test script i get this error.
Code:normand@MX-Linux:~
$ bktest
ssh: Could not resolve hostname smb: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]P.S. I have not look into all the softwares available with the NAS for that job yet, i just like the idea of just running a simple script...
I used a rsync script to sync my linux drives to an USB external drives for years.
Code:if [ -f "/media/normand/29A0D72B224114DE"/usbmedia-mounted3 ]
then
rsync -t -r -h --delete --progress --partial-dir=DIR --stats /media/normand/5235256205C5426E/Musique "/media/normand/29A0D72B224114DE"
fiI am puzzled on how to modify that script to sync my new NAS drives (just some of the folders) to a USB external drive.
Something like this:
Code:if [ -f "/home/normand/Desktop/TEMP"/smb-mounted ]
then
rsync -t -r -h --delete --progress --partial-dir=DIR --stats smb://synology.local/homes/normand/Livres/GustavMahler/ "/home/normand/Desktop/TEMP"
fiWhen i run my test script i get this error.
Code:normand@MX-Linux:~
$ bktest
ssh: Could not resolve hostname smb: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]P.S. I have not look into all the softwares available with the NAS for that job yet, i just like the idea of just running a simple script...