Reputation: 117
On my Google VM disk I'm creating various video files.
The video files need to be accessible on my disk for an hour, but after that period, I want to move them to a Google Cloud bucket.
What would the gsutil command be to copy/move files over a certain age?
Currently I'm storing the creation of these videos in a database and calling a script that generates the filenames to be moved. But surely gsutil can do this for me using the file's age?
Upvotes: 1
Views: 1095
Reputation: 12145
If you can incorporate a timestamp into the start of your object names you could list objects in age order and then copy/move ones older than some threshold.
Upvotes: 2