0
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?
Thanks
Since the OP mentions that his experience with scripting is weak, I think he expects a bit more detailled answer. This should be a comment maybe ? – mveroone – 2013-11-14T14:48:59.717
My Linux skill is strong, so don't worry:) Thanks for the suggestion. Since I am only interested in 2 files, one per directory, and not the other 100's of files and folders, so unfortunately this will not work. I have been using rsnapshot in the passed, but I feel it is an overkill, but maybe that is the way forward. – Mackis5 – 2013-11-15T07:37:31.027
There's always the this option,
--include=PATTERN
– X Tian – 2013-11-15T14:32:05.773