01The situation
The business moved large volumes of files into Oracle Cloud Infrastructure object storage. It was all done by hand, split across several people: slow, inconsistent from one person to the next, and with nothing to stop an infected file landing in the bucket.
02What it had to do
- Scan every file before it leaves the server.
- Keep infected files out of storage, but don't lose them.
- Never lose what's already in the bucket if a sync goes wrong.
- Run unattended for large batches, the same way every time.
03How it works
Scan
Each batch is scanned with ClamAV and checked with VirusTotal on the server before any upload starts.
Quarantine
Anything flagged is moved to a quarantine area and kept for review instead of being uploaded or deleted.
Back up
Before each sync, a backup of the destination is taken. rclone sync makes the bucket match the source, so this keeps a way back if the source was wrong.
Sync
Clean files go to OCI object storage with rclone sync, scripted in Bash so a batch runs without anyone watching it.
04What changed
- One script replaced a manual process shared by several people, so every transfer ran the same way.
- Infected files were held back for review and never reached cloud storage.