Move Files with the CLI
- Print
- DarkLight
Move Files with the CLI
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
The Backblaze B2 Cloud Storage command-line interface (CLI) supports the b2-copy-file-by-id
command that you can use to copy a file from one bucket to another bucket.
The context for making this call in the CLI is as follows:
b2 copy-file-by-id <sourceFileID> <destinationBucketName> <b2FileName>
The sourceFileID
is the file ID of the file that you want to copy to the new bucket.
There are two options to find a file ID:
- Use the
b2 ls --long b2://<bucketName>
command in the Backblaze B2 CLI. - In the Backblaze web console, click the āiā icon next to a file. The Fguid is the file ID for that file.
The following example shows you how to copy a file from one bucket to another bucket.
b2 copy-file-by-id 4_z63e743dfd068c90f538d0b10_f209db5804cb3a4d0_d20191021_m232927_c001_v0001109_t0011 S3-SEDemo newfile.txt
Was this article helpful?