First I would like to say that I am terrible with scripting so this has been a true challenge for me. Any input would be great!
I would like to automate an sftp transfer every 24h. If I am lucky in the near future, I might be able to mount this share instead or at least have an ssh connection to use rsync or scp.
Ubuntu 10.04 In /res/output/ I will have new directories created all the time (with a counter added to the directory name) such as: /res/output/my_output_17/.pdf /res/output/my_output_17/addon/addon_1/.db (the directories "addon/addon_1/" always have that name so only the my_output_* will change name as well as the 2 files of interest. These should be dumped to a remote sftp directory, where we should save them int my_output_* directory that the script needs to create as well.
How can I do this? I want to make sure I only copy the non-transferred files. I would assume I need to populate some "db file" and make sure those files are skipped next time the script is running?