Even though I'm late for the feast, still, here is the recipe, and I believe it's a practical method, with some preconditions.
The core idea is telling the server to move the objects in a particular location (which of course is in one Samba share) to another location (which of course is in another Samba share).
inotifywait is the chef, with the cookers called
mv. That's the team for our dinner.
And the kitchen (or maybe dinning room) looks like this:
A user login to, let's say, share.x. If the user wants to move/copy something inside share.x to share.y, here is the operation:
Pick the objects inside share.x, move/copy them to
The server is monitoring those
to.share.* folders with
inotifywait, thus it knows it's time to work.
The server moves the objects inside
The preconditions include, a particular folder structure as above, a job/service/script run on the server to do the real
I do have my own script code to share with you, but there're a lot of improvements to make:
inotifywait -m "$source_dir" --format '%w%f' -e moved_to,create,modify |
while read file; do
mv -v "$file" "$dest_dir";
$dest_dir to fit your own need.
supervisor to manage a bunch of scripts such as above to make my "Samba teleportation". If you're not familiar with
supervisor, please refer to http://supervisord.org/ and other answers about it.