title: How to upload larger than 5Tb object to Google Cloud Storage?
body: <p>Trying to save a <strong>PostgreSQL backup (~20 Tb)</strong> to <strong>Google Cloud Storage</strong> for the long-term, and I am currently piping PostgreSQL <code>pg_dump()</code> command to an <strong><a href="https://cloud.google.com/storage/docs/streaming" rel="nofollow noreferrer">streaming transfer</a></strong> through <code>gsutil</code>.</p>
  <pre class="lang-sh prettyprint-override"><code>pg_dump -d $DB_NAME -b --format=t \
      | gsutil cp - gs://$BUCKET_NAME/$BACKUP_FILE
  </code></pre>
  <p>However, I am worried that the process will crash because of GCS' <strong>5Tb <a href="https://cloud.google.com/storage-transfer/docs/known-limitations-transfer#object-limit" rel="nofollow noreferrer">object size limit</a></strong>.</p>
  <p>Is there any way to <strong>upload larger than 5Tb objects to Google Cloud Storage</strong>?</p>
  <h2>EDITION: using <code>split</code>?</h2>
  <p>I am considering to pipe <code>pg_dump</code> to Linux's <code>split</code> utility and the <code>gsutil cp</code>.</p>
  <pre class="lang-sh prettyprint-override"><code>pg_dump -d $DB -b --format=t \
      | split -b 50G - \
      | gsutil cp - gs://$BUCKET/$BACKUP
  </code></pre>
  <p><strong>Would something like that work?</strong></p>