Getting Started#
Basic Concept#
In existing Linux or Unix environments, scp commands are commonly written into shell scripts to transfer files between servers.
For example, files created after a database backup completes can be copied to a remote server, or result files processed in a batch job can be transferred to a specified folder on the next system.
A typical SCP transfer directly specifies the source file, destination server, login account, and storage path in the command. A shell script can be structured to create or compress files, call the scp command, and then continue with the next task after the transfer completes.
- File Creation
- File Compression
- Run SCP
- Save to Remote Server
- Next Task
However, as the number of servers increases or transfer tasks become more complex, source and destination information, connection information, and file paths may become distributed across multiple scripts.
For example, when files generated on one server are transferred to multiple systems, or when multiple batch scripts each use different target servers, transfer commands and settings must be managed separately in each script.
When converting to INNORIX CLI, existing tasks performed by shell scripts, including file creation, compression, and data processing, can remain unchanged while the file transfer section previously handled by SCP is replaced with INNORIX CLI execution.
{
"name": "nightly-export",
"flowName": "nightly-export",
"transferType": "normal",
"timezone": "Asia/Seoul",
"details": [
{
"senderId": "<sourceDeviceId>",
"receiverId": "<targetDeviceId>",
"sourceItem": [{ "filePath": "C:/data/out", "isDir": true }],
"targetPath": "C:/incoming",
"step": 1,
"transferOptions": { "noSchedule": false, "target-action": "overwrite" }
}
],
"schedules": [
{ "type": "none", "startDateType": "now", "startDate": "2026-09-14T02:00:00.000Z", "timezone": "Asia/Seoul" }
],
"step": 1,
"isUpcoming": false
}
In other words, rather than rebuilding the entire existing automation structure, you can analyze the transfer information contained in the existing SCP commands and convert the same file flow to CLI-based transfer.
Conversion Scope#
When converting an SCP script, first identify the part of the entire shell script that actually handles file transfer.
A single script may contain multiple commands covering everything from file creation through post-transfer cleanup.
Daily Backup Script
- Database Export
- File Compress
- File Rename
- SCP TransferConversion Target
- Archive
In this case, there is no need to change all existing tasks including database backup, compression, and file renaming.
Find the scp execution section that actually transfers files to the remote server and replace it with INNORIX CLI.
| Existing Task | Convert? | Processing Method |
|---|---|---|
| File Creation | Keep | Use existing shell command |
| File Compression | Keep | Use existing processing logic |
| Rename File | Keep | Use existing script |
| File Transfer | Convert | Run INNORIX CLI |
| Follow-up Task | Keep or Connect | Run according to transfer result |
This allows you to change the file transfer method in stages while preserving the existing automation environment.
IT Engineer#
Command Analysis#
When starting the conversion, identify the values used for actual file transfer in the existing scp command.
An SCP command generally includes the files to transfer, the remote server, and the target path. Depending on the environment, it may also use a user account, port, or repeated-processing options.
For example, the transfer command in an existing script can be divided as follows.
Run scp
- SourceFiles and paths to transfer
- ConnectionTarget server and connection information
- TargetStorage path on target server
- OptionsExisting transfer conditions
Before conversion, organize the following items.
| Item | Details |
|---|---|
| Source | File or directory to transfer |
| File Path | Location where the file is created |
| Destination | Server that will receive the file |
| Storage Location | File path on the target server |
| Connection Information | Information used for the existing server connection |
| Transfer Scope | Single file or multiple files |
| Execution Time | Manual, batch, or repeated execution |
| Existing Options | Transfer conditions applied to the command |
#!/bin/bash
SOURCE="/data/export/report.csv"
TARGET_USER="backup"
TARGET_HOST="192.168.10.20"
TARGET_PATH="/data/incoming/"
scp "$SOURCE" "$TARGET_USER@$TARGET_HOST:$TARGET_PATH"If a single script contains multiple SCP commands, identify each file flow separately.
For example, if one batch job transfers result files to different servers, you can organize them as follows.
Batch Job
- Analysis Serverreport.csv
- Backup Serverbackup.tar
- Archive Serverresult.zip
In this case, separate the source file, destination, and storage path for each transfer target, then apply each transfer configuration to the CLI execution.
Transfer Configuration#
Prepare the INNORIX CLI transfer configuration based on the source and destination information identified in the existing SCP command.
Specify the location of the actual files to transfer in Source, and connect the receiving system and storage location in Target.
innorix cp -r /data/export/ name:<targetDeviceId>:/data/incoming/The relationship between the existing SCP command and the CLI configuration can be organized as follows.
| Information Used in SCP | CLI Conversion Configuration |
|---|---|
| Source File | Source file |
| Local File Path | Source path |
| Remote Server | Target system |
| Target Server Path | Target path |
| Connection Conditions | Connection information |
| Transfer Options | CLI execution conditions |
The basic goal during conversion is to configure the same files to arrive at the same target location as before.
File Conditions#
An SCP script may transfer only one specific file or repeatedly process multiple files generated by date.
Therefore, configure CLI transfer conditions according to how the existing command selects files.
For example, you can use the following file flow.
When configuring file conditions, you can use the following criteria depending on the task.
| File Type | Configuration Method |
|---|---|
| Single Result File | Transfer only the specified file |
| Files by Date | Select based on creation date or name |
| Specific Extension | Transfer only required file types |
| Multiple Result Files | Process target files in the specified path together |
| Repeated Batch | Connect according to the execution cycle of the existing shell script |
innorix cp /data/export/*.tar name:<targetDeviceId>:/data/incoming/This allows you to preserve the file scope handled by the existing SCP script while transferring only the required files.
Script Integration#
After the transfer configuration is complete, connect INNORIX CLI execution at the location where scp was executed in the existing shell script.
For example, if the existing script creates and compresses a file and then runs SCP, you can change it to run the CLI in the same processing sequence.
Existing Script
- File Generation
- File Processing
- scp
- Next Job
After Conversion
- File Generation
- File Processing
- INNORIX CLI
- Transfer Result
- Next Job
#!/bin/bash
# File Generation
./create_backup.sh
# File Processing
tar -czf /data/export/backup.tar.gz /data/export/backup
# INNORIX CLI Transfer
innorix cp /data/export/backup.tar.gz name:<targetDeviceId>:/data/incoming/
# Next Job
./cleanup.shThe existing script can preserve the file creation and processing sequence, and follow-up tasks that previously ran after file transfer can remain connected.
For example, you can preserve the following structure.
- DB Export
- Create Backup File
- Compress
- INNORIX CLI Transfer
- CompletedCleanup
- ReviewCheck & Retry
This allows you to replace the file transfer method without significantly changing the existing automation structure.
Result Check#
After CLI execution, check whether the transfer completed successfully and connect the result so the next task in the existing script can run.
In the transfer results, check the file processing status and whether the transfer completed. If necessary, also verify that the files were stored correctly on the target system.
innorix cp /data/export/backup.tar.gz name:<targetDeviceId>:/data/incoming/
if [ $? -eq 0 ]; then
echo "Transfer completed successfully."
./cleanup.sh
else
echo "Transfer failed."
exit 1
fiAfter conversion, you can check the results using the following flow.
| Check Stage | Details |
|---|---|
| Execution Start | Check whether the CLI transfer task started successfully |
| File Processing | Check whether all target files are included in the transfer |
| Transfer Status | Check In Progress or Completed status |
| Target Check | Check whether files were applied to the specified server and path |
| Follow-up Task | Run the next task according to the transfer result |
| Rerun | Adjust conditions and rerun if additional review is required |
When the transfer completes, you can continue with cleanup tasks or the next batch task used by the existing script.
Conversion Verification#
Before applying it to the production environment, verify that the existing SCP method and INNORIX CLI method process the same file flow.
Especially when repeatedly transferring multiple files or using multiple target servers, compare the file count, storage paths, and execution results.
During verification, check the following items.
| Verification Item | Details |
|---|---|
| Source File | Whether the same file as the existing SCP method is selected |
| Transfer Scope | Whether all required files are included |
| Target Server | Whether files are transferred to the specified system |
| Storage Path | Whether files are applied to the same location as before |
| File Count | Whether files are processed without omissions |
| Execution Result | Whether transfer completion status can be checked correctly |
| Follow-up Task | Whether the next task in the existing batch continues correctly |
After verification is complete, replace the SCP command used in the existing shell script with INNORIX CLI execution and apply it to the production environment.
Through this process, you can configure a conversion flow covering Analyze Existing SCP Commands → Configure Source and Destination → Apply File Conditions → Connect Existing Script → Check Transfer Results → Test and Verify.
Because only the actual file transfer section changes while the existing file creation, processing, and batch execution structure remains intact, you can gradually convert to CLI-based transfers without rewriting the entire existing automation environment.
Developer#
Convert existing SCP commands and scripts to INNORIX CLI commands
After installing and logging in to the CLI, replace scp commands with innorix scp and replace only the invocation sections in scripts and scheduled tasks. Prepare the following items before starting.
| Requirement | Details |
|---|---|
| INNORIX CLI | Console transfer client package (.deb/.rpm, etc.) |
| INNORIX Account | Login email + password, server endpoint (host:port) |
| Target Device | Device identifier (name, ID, IP, MAC) replacing the existing scp target host |
| Path, Encoding | Path conditions that must be preserved, including Korean filenames and letter case |
Authentication is handled through a local login session created by
innorix login, not by individual commands. Do not pass the password as a command argument (prevents exposure in history andps). Replace device identifiers and paths with actual values.
CLI Setup and Login#
Install the package and log in with the account to create a session. The password is entered interactively so it does not remain on the screen or in shell history.
# install (Linux .deb example)
sudo dpkg -i innorix-cli_x.y.z_amd64.deb
innorix --version
# login — password entered interactively
innorix login --endpoint app.innorix.com:443 --email user@example.com
# Password: ********
# (optional) save a reusable server/account profile (password is not stored)
innorix profile add prod --endpoint app.innorix.com:443 --email user@example.comConvert scp Commands#
Replace the user@host token with a device identifier while keeping existing flags including -r. Connection information is removed from the command and authentication uses the pre-established login session.
# before — upload
scp report.pdf alice@host.example.com:/incoming/
# INNORIX CLI (device identifier in place of host; SSH username not used)
innorix scp report.pdf web-01:/incoming/
# before — recursive directory download
scp -r alice@host.example.com:/data/logs ./logs
# INNORIX CLI (-r kept)
innorix scp -r web-01:/data/logs ./logs
# when specifying by device ID or IP
innorix scp report.pdf id:DEV-1024:/incoming/
innorix scp report.pdf ip:192.168.0.10:/incoming/Transfer encryption is specified with the global option --encrypt <true|false>, with a default value of false. To verify integrity after transfer, add --verify <algo> (e.g., md5).
innorix scp -r ./data web-01:/backup/ --verify md5Convert Scripts, Scheduled Tasks#
In shell scripts, replace only the transfer invocation with innorix .... Branching based on the exit code ($?) can be preserved, but if the existing script parses scp output strings, modify it to match the INNORIX CLI output format.
#!/usr/bin/env bash
set -euo pipefail
# before: scp -r ./out/ alice@host:/var/www/out/
innorix scp -r ./out/ web-01:/var/www/out/For cron or schedulers without an interactive session, perform a non-interactive login using environment variables in a wrapper script, then run the transfer. Inject the password from a file with restricted permissions or a secret store.
#!/usr/bin/env bash
set -euo pipefail
export INNORIX_EMAIL="user@example.com"
export INNORIX_PASSWORD="$(cat /etc/innorix/secret)" # file mode 600
innorix login
innorix scp -r /data/ web-01:/backup/Connection Information Moves to Device Registration, Login
scpspecifies the account, key, and host for each invocation, while INNORIX CLI moves account authentication to theinnorix loginsession and the target host to a registered device identifier. After conversion, remove SSH keys and account strings from the script.
Unsupported, Caution Options
-C(compression) has no direct equivalent, and-p(preserve permissions, timestamps) also has no direct equivalent, so verify separately if permissions or timestamps must be preserved. Replace-v(verbose) with--log-level. Unlike existingscp, do not specify the target server address or port in the command. Target connection information (address, port, authentication) is configured in advance when registering the device with INNORIX, and only the registered device identifier is specified in the transfer command. Options outside the SCP scope (bandwidth limiting, resume, etc.) are covered in the rsync conversion.
Implementation Result#
Applying this recipe allows you to convert SCP scripts to INNORIX CLI using the following flow.
Move scp commands and scripts distributed across servers to innorix scp, remove SSH keys and account strings from the scripts, and transfer using the INNORIX login session and registered device identifiers.