How To Automate File Export From FTP On Cloud Engine To Cloud Storage

I have built an FTP server on Google Cloud Compute Engine where several users send data to a directory on this FTP as follows:

  • user1 send data to /srv/ftp/user1

  • user2 send data to /srv/ftp/user2

  • user3 send data to /srv/ftp/user3

I want to automate moving data from user1, user2 and user3 to storage buckets with their names whenever they add new file to their directory (the storage will be as an archive for this data).

My question is:

Is it possible to use Cloud Functions to do that? And what trigger can be used in this case?

Also, if there is any example out there that can help me to understand the process it would be great.

Thanks in advance.



This can be accomplished by using a Background Cloud Function along with a Cloud Storage trigger since it can be set to monitor a specific bucket for new files and execute load script whenever the trigger is fired.

More info in the links provided above.

Let me know if it helps.