I’m running ownCloud Server 10.1.0 on a dedicated LAMP server. I would like to write a script that will automatically archive certain files from users (based on conditions I will set). I thought about writing a bash script that will loop over all files in certain directories, and if conditions are met, then it will move the files away from ownCloud and send them to AWS to store them. Afterwards, I thought about running
sudo -u www-data php occ files:scan --path="user_id/files/path" in each directories where files were moved to rescan in order to avoid ownCloud from showing non existing files to users.
Does this seem to be a right way of achieving what I want ? Do you have any ideas on how I could do otherwise ?
All ideas welcome
Thanks a lot!