I have a usb key on my volumio, and plenty of music on my hard disk on an other computer. With lftp on Linux, it is easy to automagically make a copy of the hard disk to the usb key. Useful if you download music on your hard disk and you don’t want to open a ftp session each time.
In a terminal or an executable file on my computer:
lftp -e “open -u root,volumio sftp://volumio; cd /mnt/USB/; lcd /home/laurent/Musique;mirror -R -n . ; exit”
Or embedded in a python program :
subprocess.call([“lftp”,"-e", “open -u root,volumio sftp://volumio; cd /mnt/USB/;lcd /home/laurent/Musique;mirror -R -n .; exit”])
Remark: The mirror function of lftp downloads only what is new since the last update. I had an issue with the time on my volumio which was not correct. So fix the correct date/time on volumio to be sure that the files won’t be copied several times.