I am trying to create a python3 app to store file backups on a remote server. Using rsync to sync between my local and remote machine works fine.
What I would like to achieve is a json file containing the server directory structure and file names, not the content of the files, only names, and store the structure as a json file to be returned to my python app.
I have tried using rsync commands to achieve this, but I keep copying complete files, I only need the directory names, and file names contained within the server, ideally I would like to be stored as a json file so I can convert to dict in my program.
My server runs ubuntu 18.04