request vmhost local-file-copy
Syntax
request vmhost local-file-copy source source_path destination destination_path;
Description
Copy a file or a directory present under /var/public/ directory structure on the hypervisor to a different name under /var/public/ directory structure.
Options
-
source source-path—Name of the source path from which the file is to be copied.
-
destinationdestination-path—Name of the destination path to which the file is copied.
Additional Information
Consider the following guidelines while creating a local path.
-
Both paths should be under /var/public/ directory
-
Avoid special characters. You can include alphanumeric characters, hyphen, underscore, dot, and asterisk.
-
Avoid relative path components .. and /./
-
Avoid ending the path with /.
Following are the examples of a path:
-
/var/public/sanity_packages
-
/var/public/sanity_packages/readme.txt
-
/var/public/12-hours.data
Required Privilege Level
Maintenance
Sample Output
- request vmhost local-file-copy (To copy a directory)
- request vmhost local-file-copy (To copy a file specifying the destination file name)
- request vmhost local-file-copy (To copy a file specifying the destination directory)
request vmhost local-file-copy (To copy a directory)
user@host> request vmhost local-file-copy source /var/public/sanity_packages destination /var/public/new_sanity_packages '/var/public/sanity_packages' -> '/var/public/new_sanity_packages' '/var/public/sanity_packages/centos-linux-1.img.gz' -> '/var/public/new_sanity_packages/centos-linux-1.img.gz' '/var/public/sanity_packages/vnf_test_pkg.tar.gz' -> '/var/public/new_sanity_packages/vnf_test_pkg.tar.gz' '/var/public/sanity_packages/readme.txt' -> '/var/public/new_sanity_packages/readme.txt'
request vmhost local-file-copy (To copy a file specifying the destination file name)
user@host> request vmhost local-file-copy source /var/public/sanity_packages/readme.txt destination /var/public/new_sanity_packages/new_readme.txt '/var/public/sanity_packages/readme.txt' -> '/var/public/new_sanity_packages/new_readme.txt'
request vmhost local-file-copy (To copy a file specifying the destination directory)
user@host> request vmhost local-file-copy source /var/public/sanity_packages/readme.txt destination /var/public/new_sanity_packages/ '/var/public/sanity_packages/readme.txt' -> '/var/public/new_sanity_packages/readme.txt'
Release Information
Command introduced in Junos OS Release 24.2R1 for NFX150, NFX250, and NFX350 devices.