Storage Transfer Service in Google Cloud
A plain-English guide to moving huge amounts of data into, out of, and between Google Cloud storage: safely, on a schedule, and without babysitting a single copy command.
Imagine you run a shop that has outgrown its old building. Inside are ten million boxes, and every one of them must reach the new building across town. You could carry them yourself, one trip at a time, and hope nothing gets dropped. Or you could hire a professional moving company that brings trucks, counts every box, checks each one on arrival, retries anything that goes missing, and sends you a report at the end.
Storage Transfer Service, often shortened to STS, is that moving company for your data. It is a fully managed service inside Google Cloud that copies files and objects from one place to another at large scale. You describe what to move and where it should go. Google runs the trucks.
In this guide you will learn what STS is, which sources it can read from, how it works inside, how to keep it secure, how to watch it, how to make it fast, and how to avoid the mistakes that cost teams time and money. Every new word is explained the first time it appears, and every big idea comes with an everyday comparison.
WWhat Storage Transfer Service Is
Before the details, let us settle the basic vocabulary and the basic problem.
Start with the word object. In cloud storage, an object is simply a file plus some information about that file, such as its name, size, and type. A photo, a video, a log file, or a database backup can each be an object. Objects live inside a bucket, which is a named container, a bit like a top-level folder that you own. Google’s object storage product is called Cloud Storage.
Now the problem. Data rarely stays in one place. A company may keep years of files in Amazon S3 and decide to analyse them with Google Cloud tools. A hospital may hold scans on servers in its own basement and want a safe off-site copy. A media team may need to copy a bucket from one Google Cloud project to another. Each of these jobs is a data transfer.
You could write your own script for this. That script would need to list millions of files, copy them in parallel, handle network failures, retry, avoid copying twice, check that the copies match, and run again tomorrow. That is a lot of careful engineering for a task that is not your real business. STS exists so you do not have to build it.
Think of STS as a courier company with a tracking dashboard. You do not drive the van. You write the pickup address, the delivery address, and the schedule. The courier picks the route, handles breakdowns, and tells you when everything has arrived.
What STS is not
STS is not a database migration tool, and it is not a streaming engine for live events. It moves files and objects. If you need to move database tables, Google has other products for that. If you need to analyse data while it moves, you would pair STS with something else. Keeping this boundary clear saves a lot of confusion later.
When someone says “we need to get our data into Google Cloud”, the first question to ask is: how much data, and from where? The answers decide whether STS, a simple copy command, or a physical device is the right tool.
AA Short History and Where STS Fits
Knowing how a service grew helps you understand why it looks the way it does today.
STS began in the mid-2010s as a fairly narrow tool. Its first big job was copying data from Amazon S3 into Cloud Storage, along with lists of public web addresses. At that time, many companies were trying to run in more than one cloud, and they needed a dependable bridge.
Over the years the service grew in three directions. First, it learned to read from more cloud sources, including Microsoft Azure storage. Second, it gained a way to reach servers that sit outside any cloud, using small helper programs called agents. Third, it became smarter about timing, adding recurring schedules and later event-driven transfers, which start copying when new files appear rather than waiting for a clock.
Cloud-to-cloud copying
The earliest use: pull data from Amazon S3 or web URLs into Cloud Storage without any servers of your own.
On-premises reach
Agents were added so that file servers in your own data centre could feed Cloud Storage, with no inbound firewall holes.
More sources and more control
Azure storage, S3-compatible systems, and Hadoop file systems joined the list, with better filters, manifests, and logging.
Event-driven replication
New or changed objects can now trigger transfers automatically, which turns STS from a batch mover into a near-continuous replicator.
Where it sits in the Google Cloud family
Google Cloud has several data movement products, and the names can sound alike. STS moves files and objects. BigQuery Data Transfer Service loads data from marketing and analytics products into BigQuery tables, which is a different job. Transfer Appliance is a physical box that you fill with data and ship to Google. Database Migration Service moves databases. Chapter 14 compares them side by side.
CCore Concepts: Jobs, Operations, Sources and Sinks
Six words carry most of the meaning in STS. Learn these and the console will make sense.
Source
The place data is read from. It could be an S3 bucket, an Azure container, a Cloud Storage bucket, a list of web URLs, or a folder on your own server.
Sink
The place data is written to. Most often a Cloud Storage bucket. With agents, it can also be a file system on your own machines. “Sink” is just an engineering word for destination.
Transfer job
The saved plan. It holds the source, the sink, the schedule, the filters, and the options. A job is like a recipe card. It does nothing by itself until it runs.
Transfer operation
One actual run of a job. A daily job produces one operation each day. Each operation has its own status, counts, and error list.
Agent
A small program, packaged as a container, that you install on a machine you control. It reads or writes files on your behalf and talks to Google over secure web traffic.
Agent pool
A named group of agents that work together. Jobs are pointed at a pool, and the pool’s agents share the work.
A transfer job is a printed delivery contract. A transfer operation is one delivery trip made under that contract. The agent pool is your own crew of drivers who work from your yard. The source is the pickup address and the sink is the drop-off address.
Other words you will meet
A manifest is a list, stored as a file, that names exactly which objects to copy. A filter is a rule such as “only objects whose names start with this prefix”. A prefix is the beginning of an object’s name, which acts like a folder path. Metadata is information about a file, such as when it was last changed or what type it is. A checksum is a short fingerprint calculated from a file’s contents, and two files with the same fingerprint are almost certainly identical.
A job is the plan. An operation is one run of the plan. Many support questions come from mixing these two up, for example asking why a “job” has failed when only one “operation” failed.
SSupported Sources and Destinations
What can STS read from, and where can it write? The table below is the map.
| Source | Destination | Needs agents? | Typical use |
|---|---|---|---|
| Amazon S3 | Cloud Storage | No | Moving a data lake or backups out of AWS |
| Azure Blob Storage and Data Lake Storage Gen2 | Cloud Storage | No | Consolidating Azure data into Google Cloud |
| Cloud Storage bucket | Cloud Storage bucket | No | Copying between projects, regions, or storage classes |
| List of public HTTP or HTTPS URLs | Cloud Storage | No | Pulling public datasets or partner files |
| POSIX file system on your servers | Cloud Storage | Yes | Backing up on-premises file servers |
| Hadoop file system (HDFS) | Cloud Storage | Yes | Moving big data clusters to the cloud |
| S3-compatible storage outside AWS | Cloud Storage | Yes | Leaving third-party object stores |
| Cloud Storage | POSIX file system | Yes | Bringing data back to local servers |
| POSIX file system | POSIX file system | Yes | Copying between two of your own sites |
Notice the pattern. When both ends are public cloud services that Google can reach directly, no agents are needed. When either end is a machine hidden inside your own network, an agent must sit next to that data. This single rule explains most of the design choices you will make.
A note on web URL lists
The URL list option works from a plain text file, in a tab-separated format, that you store in a place STS can read. Each line holds a web address, and usually the file size and a fingerprint so that STS can confirm the download is correct. It is a handy way to pull a set of public files into a bucket without writing a download script.
Supported sources and options change over time as Google adds features. Before you design a big migration around a specific source or setting, check the current Google Cloud documentation page for Storage Transfer Service so you are not planning around an out-of-date detail.
AArchitecture and Components
Let us open the box and see the main parts, and how they talk to each other.
STS has a control plane and a data plane. The control plane is the brain. It stores your job definitions, decides when runs should start, hands out work, and records results. The data plane is the muscle. It is the set of workers that actually read bytes from the source and write them to the sink.
For cloud-to-cloud transfers, Google runs the data plane for you on its own infrastructure. You never see these workers. For agent-based transfers, your own agents become the data plane on the source or destination side, while the control plane stays in Google Cloud.
flowchart LR
U["You: Console, CLI or API"] --> CP["STS control plane: jobs, schedules, status"]
CP --> DP["Google managed workers"]
CP --> AP["Agent pool"]
S3["Amazon S3 or Azure Blob"] --> DP
GCSsrc["Cloud Storage source bucket"] --> DP
URL["Public URL list"] --> DP
DP --> GCS["Cloud Storage destination bucket"]
FS["On-premises file system"] --> AP
AP --> GCS
CP --> MON["Cloud Monitoring and Logging"]
CP --> PS["Pub/Sub notifications"]
The supporting cast
Identity and Access Management (IAM) decides who can create jobs and what STS itself may touch. Cloud Monitoring shows charts of bytes and objects moved. Cloud Logging keeps detailed records of what happened to individual objects. Pub/Sub, Google’s messaging service, can send you a message when a transfer finishes or fails, and it is also the channel used for event-driven transfers from Cloud Storage. Secret Manager can hold credentials for outside clouds so they are not pasted into a form.
The control plane is the dispatch office with the map and the schedule board. The data plane is the fleet of trucks. The monitoring tools are the screens on the office wall showing where each truck is. You talk to the office, never to the trucks.
Because the control plane is a managed service, you do not patch it, scale it, or restart it. Your operational duties are limited to the things you own: permissions, the agents you installed, and the transfer settings you chose.
AAgentless versus Agent-Based Transfers
This is the biggest design choice in STS, and it is easy once you see the reason behind it.
Agentless transfers
In an agentless transfer, nothing is installed anywhere. Google’s workers connect straight to the source over the internet using credentials you provide, and write straight into your bucket. This works when the source is a public cloud service reachable from the internet, such as S3 or Azure Blob Storage.
Agent-based transfers
An agent-based transfer is needed when the data sits on machines that the outside world cannot reach, like a file server in your office. Here you install agents inside your network. Each agent makes outbound secure connections to Google, asks the control plane “is there work for me?”, and then reads or writes files as instructed. Because the agents call out, you do not need to open any incoming ports in your firewall.
flowchart TB
subgraph OnPrem["Your data centre"]
NAS["File server or NAS"]
A1["Agent 1"]
A2["Agent 2"]
A3["Agent 3"]
NAS --> A1
NAS --> A2
NAS --> A3
end
A1 -->|"HTTPS outbound"| CP["STS control plane"]
A2 -->|"HTTPS outbound"| CP
A3 -->|"HTTPS outbound"| CP
A1 --> GCS["Cloud Storage bucket"]
A2 --> GCS
A3 --> GCS
How agent pools behave
All agents in a pool are treated as equal helpers. If you add more agents, the pool can move data faster, because more hands share the work. If one agent crashes, the others keep going and the lost work is picked up again. For this reason, teams that care about reliability run more than one agent, commonly three or more, on separate machines.
A pool can also be given a bandwidth limit. This is a cap on how much network capacity the agents may use at once. It is very useful when the same internet link is shared with office staff or customer traffic, because it stops a big migration from slowing everyone else down.
Agentless strengths
- No machines to install or patch
- Google scales the workers for you
- Fastest to set up for cloud sources
Agent-based costs
- You must run and maintain the agent machines
- Speed depends on your hardware and network link
- Needs container support on the agent hosts
Place agents as close to the data as you can, ideally on a fast local network to the file server. An agent that has to fetch files across a slow link first becomes the bottleneck of the whole job.
HHow a Transfer Runs Internally
Follow one transfer operation from the moment it starts to the moment it finishes.
Start and validate
The control plane wakes up at the scheduled time, checks that the job is still enabled, and confirms that STS has permission to read the source and write the sink. If permissions are missing, the run fails early and tells you why.
List the source
STS builds a list of candidate objects. It applies your prefix filters, date filters, or manifest. For very large sources, this listing step alone can take a while, and it runs in parallel pieces.
Compare with the sink
For each candidate, STS checks whether the destination already has an equal copy. It looks at things like size, modification time, and fingerprints. Objects that are already identical are skipped, which is why repeated runs are cheap.
Copy in parallel
The remaining work is cut into many small tasks and handed to workers. Large objects may be moved in pieces, and many objects move at the same time. This is where the speed comes from.
Verify and retry
After each copy, STS checks the fingerprint where one is available. If a task fails because of a temporary problem like a network hiccup, it is retried automatically, with waiting time between attempts.
Clean up if asked
If you chose to delete extra objects from the destination, or to delete objects from the source after a successful copy, that happens now, and only for objects that were handled correctly.
Report
The operation ends with a status and a summary: objects found, objects copied, objects skipped, bytes moved, and failures. Metrics, logs, and notifications are produced at this point and along the way.
This is how a careful mover works. First walk through the house with a clipboard (list). Check what is already in the new house (compare). Send many movers at once with boxes (parallel copy). Check each box against the list when it arrives (verify). Take back anything that went to the wrong place (retry). Hand over a signed report (summary).
Why skipping matters
Step 3 is the hidden hero. Because STS skips objects that are already identical, you can run a big job once to move the bulk of the data, and then run it again right before the final switch-over to catch only what changed. The second run is short, because most of the work was already done.
DData Flow and Lifecycle of a Transfer
Every job moves through a small set of states. Knowing them helps you read the dashboard calmly.
A transfer job itself is either enabled, meaning it will run on its schedule, disabled, meaning it is paused, or deleted, meaning it is gone from the active list. Each operation under it moves through its own states: it is queued, then in progress, and finally ends as successful, failed, or aborted. A paused or cancelled run ends as aborted.
flowchart LR
A["Job created"] --> B["Waiting for schedule or event"]
B --> C["Operation starts"]
C --> D["Listing and comparing"]
D --> E["Copying objects"]
E --> F{"All objects handled?"}
F -->|"Yes"| G["Success"]
F -->|"Some failed"| H["Failed with error summary"]
C -->|"Stopped by user"| I["Aborted"]
G --> B
H --> B
Partial success is normal
Beginners are sometimes surprised that an operation can copy ninety-nine thousand objects and still be marked as failed because of a handful of problem files. This is by design. STS reports honestly that something needs attention. The error summary lists the affected objects and the reason, such as a missing permission or an object that changed during the copy.
The next scheduled run will try those objects again, since they are still missing or different at the destination. Often, the problem disappears by itself. If it does not, the error details tell you what to fix.
A failed operation does not mean all your data failed. Read the counts first. Then read the error list. Then decide whether to fix something or simply wait for the next run.
SScheduling, Filters, Manifests and Event-Driven Transfers
When does a transfer run, and which objects does it touch? This chapter covers the dials you can turn.
Scheduling
A job can run once, right now or at a time you choose. It can also repeat on a schedule, such as every hour, every day, or every week, with a start date and an optional end date. Recurring jobs are ideal for ongoing backups and for keeping a destination bucket close to a source that keeps changing.
Filters
Filters narrow down what gets copied. You can include only objects whose names begin with certain prefixes, or exclude prefixes you do not want. You can also filter by time, for example “only objects modified in the last seven days”. Filters reduce cost and run time, because STS never touches what you did not ask for.
Manifests
A manifest is a file, stored in Cloud Storage, that lists the exact objects to transfer. Use it when your selection rule is too clever for prefixes, for example “these 40,000 specific files that our audit flagged”. The manifest turns a vague wish into a precise shopping list.
Event-driven transfers
Instead of running on a clock, an event-driven transfer waits for news. When a new object lands in an Amazon S3 bucket, a message goes into an Amazon queue service. When a new object lands in a Cloud Storage bucket, a message goes into Pub/Sub. STS listens to that queue, and copies the new object soon after. The result is a destination that trails the source by a short delay, with no polling schedule to tune.
flowchart LR
P["Producer uploads new object"] --> SRC["Source bucket"]
SRC -->|"Change notification"| Q["Queue or Pub/Sub topic"]
Q --> STS["STS event-driven job"]
STS --> DST["Destination bucket in Cloud Storage"]
A scheduled job is like checking your letterbox every evening whether or not a letter has come. An event-driven job is like a doorbell that rings the moment a parcel arrives. Doorbells save you needless trips, and parcels do not sit outside for hours.
A common plan is to combine styles. Run one big scheduled job to copy the existing history, then switch on an event-driven job to keep up with new arrivals. This avoids having a gap or an overlap between the old data and the new.
OOverwrite, Delete and Metadata Options
These settings decide what happens when the destination already has something, and what happens to leftovers.
When should STS overwrite?
If an object with the same name already exists at the destination, STS needs a rule. There are three common choices. Overwrite if different replaces the destination copy only when the two do not match, which is the usual default and the best choice for most jobs. Never overwrite leaves existing objects alone, which protects the destination. Always overwrite replaces everything every time, which is rarely needed and wastes effort.
Deleting at the destination
You can ask STS to delete objects from the destination that no longer exist at the source. This turns a copy into a mirror: the destination becomes an exact picture of the source. It is powerful and risky in equal measure, because a mistake in the source quickly becomes a mistake in the destination.
Deleting at the source
You can also ask STS to delete source objects after they have been copied successfully. This changes a copy into a move. It is handy for emptying a staging area or finishing a one-way migration, but it needs extra permission on the source, and it should only be used after you have confirmed that the destination is correct.
Treat both delete options like a sharp knife. Test on a small prefix first. Turn on versioning on the destination bucket so that an unwanted delete can be recovered. Never enable delete-from-source until you have checked a sample of destination objects.
Metadata
Metadata is the information that travels with each object. When copying between Cloud Storage buckets you can decide what to carry over, such as the storage class, the encryption key used, or the object’s original creation time. When copying from file systems, you can choose to keep details like file permissions and modification times. Carrying metadata across matters when other systems rely on it, for example a retention rule that looks at an object’s age.
| Option | What it does | When to choose it |
|---|---|---|
| Overwrite if different | Replaces only mismatched objects | Most migrations and backups |
| Never overwrite | Keeps existing destination objects untouched | Protecting a curated destination |
| Always overwrite | Replaces every object each run | Rare cases needing forced refresh |
| Delete from destination | Removes extras so the destination mirrors the source | Disaster recovery copies that must match exactly |
| Delete from source | Removes source objects after a verified copy | One-way moves and staging clean-up |
Overwrite settings are house rules for a shared photo album. “Replace only if different” means you swap a photo only when the new version has changed. “Never replace” means the first photo wins. “Mirror” means that if you remove a picture from your album, it vanishes from your friend’s album too. That is convenient, and also exactly why it needs care.
SSecurity and Identity
Moving data means touching keys, doors, and secrets. Here is how STS keeps them safe.
Who can do what: IAM roles
Google Cloud controls access with IAM, short for Identity and Access Management. Each person or program is given roles, and each role is a bundle of permissions. STS has its own roles. An admin role can create and change jobs. A user role can run and view jobs. A viewer role can only look. A special transfer-agent role is for the account that agents use.
This split lets you follow the principle of least privilege, which means giving each person or program only the permissions they need and nothing more. A person who only needs to check whether last night’s backup worked should be a viewer, not an admin.
The service agent
When a transfer runs, STS acts through a Google-managed identity called a service agent, which belongs to your project. This identity must be allowed to read the source bucket and write to the destination bucket. If it lacks permission, the run fails with a clear message. For delete options, it needs delete permission as well, and you should add that only when you truly use those options.
Reaching outside clouds
To read from Amazon S3 or Azure, STS needs proof that it is allowed in. The simple way is to provide an access key or token. The safer way is federated identity, where the other cloud trusts Google’s identity and hands out short-lived access without a long-lived secret ever being stored. Short-lived access is better, because a stolen key that expires in an hour is far less dangerous than a key that never expires.
A permanent access key is like giving a contractor a copy of your house key forever. Federated identity is like a visitor pass that is printed for one visit and stops working after a few hours. If the pass is lost, little harm is done.
Protecting data in motion and at rest
Data moving between systems travels over encrypted connections. At the destination, objects in Cloud Storage are encrypted at rest by default, and you can choose your own encryption keys through Cloud KMS, the key management service, if your rules require it. Agent connections use secure web traffic that starts from your side, so you do not open inbound ports.
Building a fence around the service
Organisations with strict rules can place STS inside VPC Service Controls, which draws a protective perimeter around Google Cloud services and blocks data from being copied to places outside the perimeter. For agent-based transfers over private links such as Cloud Interconnect, traffic can stay off the public internet.
Good security habits
- Use separate service accounts per job family
- Prefer federated or short-lived credentials
- Keep secrets in Secret Manager
- Grant delete rights only where needed
Risky habits
- Giving the admin role to everyone
- Pasting long-lived keys into notes or tickets
- Leaving old jobs enabled after a project ends
- Using the same credential for source and unrelated systems
After a migration ends, do two clean-up steps: disable or delete the jobs, and remove the cross-cloud permissions you created for them. Forgotten access is one of the most common sources of surprise exposure.
MMonitoring, Logging and Notifications
A transfer you cannot see is a transfer you cannot trust. STS gives you four windows.
Console and operation details
The Google Cloud console shows each operation’s status, the number of objects found and copied, bytes moved, and any error summary. This is the quickest place to check a single run.
Cloud Monitoring metrics
Charts and alerts for counts of objects and bytes, plus failures. You can set an alert such as “tell me if no bytes were copied in the last day”.
Cloud Logging
Detailed records of what happened to individual objects, such as found, copied, deleted, or failed. You choose how much to log, because logging every success on a huge job creates a lot of records.
Pub/Sub notifications
STS can publish a message when an operation changes state. A small program, or a chat tool integration, can then react to these messages automatically.
What to watch
Four numbers tell most of the story. Objects found says how much work existed. Objects copied says how much was moved. Objects skipped says how much was already identical. Objects failed says how much needs attention. For a healthy recurring job, “found” stays steady, “copied” is small after the first run, and “failed” is near zero.
Alerts worth having
Good alerts are few and meaningful. First, alert on any operation that ends as failed. Second, alert when a job that should run daily produces no operation at all, which suggests it was disabled or broke silently. Third, for agent-based jobs, alert when the count of healthy agents in a pool drops below what you need.
Think of parcel tracking. The console is the tracking page for one parcel. Metrics are the monthly report showing how many parcels were delivered on time. Logs are the signed delivery slips. Notifications are the text message that says “your parcel has arrived”.
Because logging every object on a job with hundreds of millions of files can create heavy log volume and cost, start by logging only failures, and widen the net when you investigate a problem.
PPerformance, Scaling and Cost
How fast will it go, how do you make it go faster, and what will it cost?
What sets the speed
Speed is limited by the slowest link in the chain. That could be the source system’s ability to serve files, the network between source and Google, the number of workers or agents, or the destination’s ability to accept data. For cloud-to-cloud copies, Google adds workers automatically, so the limit is more often the source’s own request limits or the network path. For agent-based copies, your agents and your internet link are the usual limits.
A quick back-of-the-envelope calculation
Planning starts with simple arithmetic. A link of 1 gigabit per second can carry about 125 megabytes each second at best. At that pace, one terabyte takes a little over two hours, and 100 terabytes takes about nine days of non-stop, perfect transfer. A link ten times faster, at 10 gigabits per second, cuts that to about 22 hours. Real life is slower, because links are shared and files have overhead, so always add a safety margin.
Many small files versus few big files
Ten million tiny files are slower than the same amount of data in a thousand big files. Every object has fixed overhead: listing it, comparing it, opening a connection, and checking it. If you control how data is produced, bundling tiny files into larger archives before the transfer can help a lot. If you cannot, plan for the extra time.
Ways to speed things up
- Add more agents for agent-based jobs, and spread them across several machines.
- Split one giant job into several jobs by prefix, so work runs in parallel.
- Run the first big pass early, then use short top-up runs near the cut-over.
- Keep the source and destination in nearby regions when you have a choice.
- Make sure the agent machines have enough memory, processor power, and a fast disk or network connection to the data.
Where the money goes
Think of cost in four buckets. First, source-side charges: Amazon and Microsoft charge for data leaving their clouds, and for the read requests STS makes. This is often the biggest line in a migration. Second, Google-side storage and request charges for the data you land in Cloud Storage. Third, network costs for any private links or cross-region copies on the Google side. Fourth, STS service charges, which depend on the type of transfer. Because prices and free allowances change, check the current Google Cloud pricing page before you promise anyone a number.
Running a recurring “always overwrite” job against a large source can quietly create a large bill, since every run re-reads and re-writes everything. Prefer “overwrite if different” so unchanged data is skipped.
Moving cost is like moving house between cities. You pay the old landlord’s exit fees, the trucking fee, and the new building’s deposit. Sending a thousand small envelopes by courier costs more than sending ten sealed crates of the same weight, because each envelope has its own handling fee.
CChoosing the Right Tool: Alternatives Compared
STS is excellent, but it is not always the right answer. Here is how it compares.
| Tool | Best for | Not ideal for |
|---|---|---|
| Storage Transfer Service | Large, repeatable, managed online copies between clouds, buckets, and servers | A single small file or a quick one-off copy |
| Command-line copy tools | Small, quick, hands-on copies you run yourself | Huge jobs that need scheduling, retries, and tracking |
| Transfer Appliance | Very large data sets where network transfer would take weeks or more | Small or moderate data, or ongoing sync |
| BigQuery Data Transfer Service | Loading analytics and advertising data into BigQuery tables | Moving files or objects |
| Database Migration Service | Moving running databases with minimal downtime | Files and object storage |
| Custom pipelines | Copies that must transform data while moving | Plain copies, where STS saves you build effort |
A simple decision path
If the data set is small and you only need it once, use a copy command from your laptop or a cloud shell. If the data is large, or the job must repeat, or someone needs a report afterwards, choose STS. If the sheer size would take weeks over your network, look at a physical appliance, and use STS afterwards to catch up with changes made during shipping.
flowchart TB
Q1{"Is the data a database?"}
Q1 -->|"Yes"| DMS["Use a database migration product"]
Q1 -->|"No, files or objects"| Q2{"Is it a quick one-off and small?"}
Q2 -->|"Yes"| CLI["Use a command-line copy"]
Q2 -->|"No"| Q3{"Would the network take weeks?"}
Q3 -->|"Yes"| TA["Consider Transfer Appliance then STS for top-ups"]
Q3 -->|"No"| STS["Use Storage Transfer Service"]
The tools combine well. A common recipe for very large migrations is a shipped device for the bulk, followed by STS to bring over everything that changed while the device was in the post.
DDesign Patterns That Work
Patterns are proven recipes. These four show up again and again in healthy STS setups.
Pattern 1: Bulk then delta
Run one large job to move the historical data. Then run short repeat jobs that move only what changed. Right before the cut-over, freeze writes at the source, run one last delta, verify, and switch your applications to the new location. This keeps downtime small even when the data is huge.
Pattern 2: Sharded jobs by prefix
Split one giant data set into several jobs, each covering a prefix range such as folders starting with different letters or dates. Jobs run side by side, failures stay contained, and you can retry one shard without touching the rest.
Pattern 3: Landing bucket then promote
Copy into a separate landing bucket first. Run checks there, such as counting objects and sampling contents. Only then copy to the production bucket. A mistake stays in the landing zone and never reaches the live data.
Pattern 4: Continuous replica with events
Use an event-driven job so a second bucket trails the first one closely. This gives you a backup copy in another project or region for protection against accidental deletion or regional trouble, without custom code.
“Bulk then delta” is exactly how people move houses. Carry the heavy furniture early, over several weekends. On the final day, carry only the toothbrush and the kettle you were still using. The big move is already done, so the last day is short and calm.
AAnti-patterns to Avoid
These are the mistakes that appear in post-incident reviews. Recognise them early.
What people do
They enable “delete from destination” or “delete from source” on the very first run of a big job, because it feels tidy.
Why it hurts
A wrong prefix or a wrong bucket choice turns into mass deletion within minutes. By the time anyone notices, a lot of data may be gone.
Do this instead
Run without delete options first. Review the counts. Turn on versioning at the destination. Add deletion only after a clean test on a small prefix.
What people do
They install a single agent on a small machine and expect it to carry a multi-terabyte job.
Why it hurts
One agent is a speed limit and a single point of failure. If that machine restarts, progress stalls, and if it is underpowered, the job crawls.
Do this instead
Run several agents on separate, well-sized machines, placed close to the data, with a sensible bandwidth cap if the link is shared.
What people do
They treat the transfer as finished when the console shows “success” and never check the result by hand.
Why it hurts
“Success” means STS did what you configured. It does not mean you configured the right thing. A wrong filter can succeed perfectly while skipping half your data.
Do this instead
Compare object counts and total sizes at both ends. Sample a few files and open them. Keep a short written checklist for sign-off.
What people do
They store long-lived cloud keys in shared documents so that “anyone can fix the job”.
Why it hurts
Anyone who can read the document can read the source data. Keys spread to chat logs, tickets, and laptops, and cannot be taken back.
Do this instead
Use federated or short-lived access, keep secrets in a secret manager, and limit who can edit jobs.
BBest Practices and Common Mistakes
A checklist you can follow before, during, and after any transfer project.
Before you start
- Measure first. Count the objects and total size at the source. Without these numbers you cannot estimate time or check the result.
- Decide the success test. Write down how you will prove the copy is correct before you begin.
- Plan permissions. List who needs which role, and which identity STS will use at each end.
- Pick the right mode. Cloud source with public access means agentless. Hidden servers mean agents.
- Estimate cost. Include source-side exit charges, because they surprise people the most.
While it runs
- Start small. Run a pilot on one prefix and check it carefully.
- Watch metrics. Compare copied bytes against your estimate to see if the pace is on target.
- Read the first error list early. Common problems such as permission gaps show up in the first hour.
- Do not change the source heavily. Objects that change during copying may be reported as failed and retried later.
After it finishes
- Verify. Compare counts and sizes, then sample content.
- Keep the source until you are sure. Hold the old data for an agreed period before removing it.
- Clean up. Disable jobs, shut down agents, remove cross-cloud permissions, and delete temporary buckets.
- Document. Write down what was moved, when, with which settings, so the next person is not guessing.
Common mistakes in one glance
| Mistake | What goes wrong | Fix |
|---|---|---|
| Missing permission for the service agent | Run fails at the very start | Grant read on source and write on destination |
| Wrong prefix in a filter | Large part of data skipped quietly | Compare counts at both ends |
| Agents on a weak machine | Slow transfer and timeouts | Use stronger hosts and more agents |
| Forgetting source exit charges | Unexpected cloud bill | Estimate cost before the big run |
| Leaving jobs enabled | Unwanted repeated copies later | Disable or delete after the project |
| Using “always overwrite” on repeat jobs | High request and write costs | Use “overwrite if different” |
RReal-World Scenarios
The cases below are illustrative stories that show the patterns in action. They are examples to learn from and are not accounts of specific companies.
Scenario 1: A retailer moves a data lake out of AWS
A retail chain keeps six years of sales and clickstream files in Amazon S3, about 300 TB in total. The analytics team wants to use Google Cloud tools. The team runs an agentless job by prefix for each year, starting with the oldest. They watch exit charges closely, run delta jobs weekly, and cut over the analytics pipeline on a quiet Sunday after a final top-up run.
Scenario 2: A hospital backs up file servers off-site
A hospital group has imaging files on servers in its own data centre. Three agents run on separate machines, with a bandwidth cap during clinic hours and a wider limit overnight. A nightly job copies only new and changed scans. Versioning on the destination bucket protects against accidental deletion, and alerts tell the on-call engineer if a night passes with no copy.
Scenario 3: A media studio copies buckets across projects
A studio reorganises its Google Cloud projects so that each production has its own. A bucket-to-bucket job moves finished assets from a shared project into the new ones. The team sets the storage class at the destination to a cheaper tier for old productions, and uses a manifest to move only the approved final cuts.
Scenario 4: A research lab pulls public datasets
A university lab needs a large collection of public files that are hosted on many websites. They prepare a URL list file with sizes and fingerprints, and run a one-time job. STS downloads files in parallel, verifies each against its fingerprint, and reports which links failed so the lab can chase only those.
Scenario 5: A software team keeps a live replica
A product team wants a second copy of its user-upload bucket in another project, for protection against mistakes. They first copy history with a scheduled job, then turn on an event-driven job so that new uploads appear in the replica shortly after they arrive.
In each story the team measured first, started small, watched the numbers, verified the result, and cleaned up afterwards. The tool is simple. The discipline around it is what makes projects succeed.
FFrequently Asked Questions
Short answers to the questions that come up most often.
SSummary and Key Takeaways
If you remember only a few things from this guide, make them these.
Storage Transfer Service takes a hard, repetitive engineering task and turns it into a managed setting. You choose a source, a destination, a schedule, and a few safety options. Google runs the workers, checks the work, and reports back. The harder part is not the tool but the planning: knowing your data, protecting it, watching the run, and proving the result.
Key Takeaways
- STS is a managed mover. It copies files and objects into, out of, and between Google Cloud storage at large scale, with retries and verification built in.
- Pick the mode by where the data lives. Agentless for reachable cloud sources, agent-based with agent pools for servers inside your network.
- Jobs are plans and operations are runs. Re-running a job skips identical objects, which makes the bulk-then-delta pattern fast and calm.
- Be careful with deletes. Test on small prefixes, enable versioning, and add delete options only after checking results.
- Secure it with least privilege. Use the right IAM roles, prefer short-lived or federated credentials, and clean up access when the project ends.
- Watch and prove. Use metrics, logs, and notifications, then verify counts, sizes, and samples yourself before trusting the result.
- Plan cost and time with arithmetic. Estimate duration from link speed, expect source-side exit charges, and consider a physical device when the network would take weeks.