Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Agen transfer mentransfer data dari sistem file Anda ke Google Cloud. Anda
dapat mengontrol opsi agen saat menjalankan
agen melalui tanda dan opsi yang dijelaskan di halaman ini.
Menentukan satu atau beberapa
volume untuk
dipetakan dari host ke penampung. Saat menggunakan -v, kami mewajibkan
host-directory
dan container-directory untuk sama, jika tidak,
Layanan Transfer Penyimpanan tidak akan berhasil menemukan file Anda untuk ditransfer.
Menentukan variabel lingkungan untuk penampung Docker. Gunakan tanda ini untuk
mengonfigurasi agen Anda agar menggunakan proxy penerusan. Untuk informasi selengkapnya, lihat
Menggunakan proxy penerusan.
Opsi agen
--agent-id-prefix=id-prefix
Awalan opsional yang ditambahkan ke ID agen untuk membantu mengidentifikasi
agen atau mesinnya di Google Cloud konsol. Jika awalan digunakan, ID agen akan diformat sebagai prefix + hostname + Docker container ID.
--creds-file=credential-file
File kredensial akun layanan berformat JSON opsional. Untuk mengetahui informasi
selengkapnya tentang cara membuat file kredensial akun layanan, lihat
membuat dan mengelola kunci akun layanan.
--enable_mount_directory
Secara opsional, memasang seluruh sistem file di direktori
/transfer_root dalam penampung Docker, bukan
menentukan setiap
pemasangan volume -vDocker.
Saat menggunakan flag ini, Anda tidak perlu menambahkan awalan /transfer_root ke direktori log atau jalur file kredensial akun layanan, dan /transfer_root tidak terlihat dalam log transfer atau contoh error GUI.
--help
Menampilkan bantuan penggunaan singkat.
--hostname=hostname
menetapkan nama host tempat agen berjalan. Digunakan untuk melaporkan nama host
mesin tempat agen tertentu berjalan.
--log-dir=logs-directory
Direktori opsional tempat agen menulis log. Direktori default-nya
adalah /tmp/.
--max-physical-mem=maximum-memory
Agen secara default menggunakan memori sistem maksimum 8 GiB. Jika setelan default
tidak sesuai dengan lingkungan Anda, Anda dapat menentukan penggunaan memori maksimum
yang relevan dalam format berikut:
Nilai max-physical-mem
Setelan memori maksimum
6g
6 gigabyte
6gb
6 gigabyte
6GiB
6 gibibyte
--project-id=project-id
String ID project yang diperlukan yang menghosting resource transfer yang dibuat dan ditagih.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[],[],null,["# Transfer agent command-line options\n\nTransfer agents transfer data from your file system to Google Cloud. You\ncan control agent options when you run an\nagent through the flags and options described in this page.\n\nCommand summary\n---------------\n\n```\nsudo docker run [--ulimit memlock=64000000 -d --rm -v host-directory:container-directory]\n--env environment-variable=variable-value\ngcr.io/cloud-ingest/tsop-agent:latest\n{--help | --version | --project-id=project-id}\n[--agent-id-prefix=id-prefix --creds-file=credential-file\n--enable_mount_directory --hostname=hostname\n--log-dir=logs-directory\n--max-physical-mem=maximum-memory]\n```\n\nDocker options\n--------------\n\n`--ulimit memlock=64000000`\n: Locks shared memory for a shared pool for Docker, so that it is always in\n memory for access by multiple sessions.\n\n`-d`\n\n: Starts the Docker container in detached mode, or in the background. This\n allows you to continue issuing commands from the Linux terminal.\n\n For more information, see\n [Detached -d](https://docs.docker.com/engine/reference/run/#detached--d)\n\n`--rm`\n\n: Deletes the container and the container's file system when Docker exits.\n\n For more information, see\n [Clean up (--rm)](https://docs.docker.com/engine/reference/run/#clean-up---rm)\n\n`-v `\u003cvar translate=\"no\"\u003ehost-directory\u003c/var\u003e`:`\u003cvar translate=\"no\"\u003econtainer-directory\u003c/var\u003e\n\n: Specifies one or more\n [volumes](https://docs.docker.com/storage/volumes/) to\n map from the host to the container. When using `-v`, we require\n the \u003cvar translate=\"no\"\u003ehost-directory\u003c/var\u003e\n and \u003cvar translate=\"no\"\u003econtainer-directory\u003c/var\u003e to be the same, otherwise\n Storage Transfer Service won't successfully locate your files for transfer.\n\n For more information, see\n [VOLUME (shared file systems)](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems)\n\n`--env `\u003cvar translate=\"no\"\u003eenvironment-variable\u003c/var\u003e`=`\u003cvar translate=\"no\"\u003evariable-value\u003c/var\u003e\n\n: Specifies an environment variable for the Docker container. Use this flag to\n configure your agents to use a forward proxy. For more information, see\n [Using a forward proxy](/storage-transfer/docs/on-prem-agent-details#using-forward-proxy).\n\nAgent options\n-------------\n\n`--agent-id-prefix=`\u003cvar translate=\"no\"\u003eid-prefix\u003c/var\u003e\n: An optional prefix that is prepended to the agent ID to help identify the\n agent or its machine in the Google Cloud console. When a prefix is used, the\n agent ID is formatted as `prefix + hostname + Docker container ID`.\n\n`--creds-file=`\u003cvar translate=\"no\"\u003ecredential-file\u003c/var\u003e\n\n: An optional JSON-formatted service account credential file. For more\n information about generating a service account credential file, see\n [creating and managing service account keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys).\n\n | **Note:** Unless you are using `--enable_mount_directory`, you must prefix this path with `/transfer_root`, for example `/transfer_root/path/to/cred_file.json`.\n\n`--enable_mount_directory`\n\n: Optionally mounts the whole file system under the directory\n `/transfer_root` within the Docker container, rather than\n specifying individual\n [Docker `-v`volume mounts](https://docs.docker.com/storage/volumes/).\n When using this flag, you don't need to prefix `/transfer_root`\n to the log directory or the service account credentials file path, and\n `/transfer_root` isn't visible in transfer logs or GUI error\n samples.\n\n`--help`\n\n: Displays brief usage help.\n\n`--hostname=`\u003cvar translate=\"no\"\u003ehostname\u003c/var\u003e\n\n: set the hostname that the agent is running on. Used to report the hostname\n of the machine a particular agent is running on.\n\n | **Note:** We recommend passing `--hostname=$(hostname)` when using this flag.\n\n`--log-dir=`\u003cvar translate=\"no\"\u003elogs-directory\u003c/var\u003e\n\n: An optional directory that the agent writes logs to. The default directory\n is `/tmp/`.\n\n | **Note:** Unless you are using `--enable_mount_directory`, you must prefix this path with `/transfer_root`, for example, `/transfer/root/path/to/log_file`.\n\n`--max-physical-mem=`\u003cvar translate=\"no\"\u003emaximum-memory\u003c/var\u003e\n\n: Agents default to using 8GiB maximum of system memory. If the default\n doesn't fit your environment, you can specify a relevant maximum memory\n usage in the following formats:\n\n`--project-id=`\u003cvar translate=\"no\"\u003eproject-id\u003c/var\u003e\n\n: Required string of the project ID that is hosting the transfer resources that are created and billed.\n\n`--version`\n\n: Displays the current version of the agent."]]