AI开发平台MODELARTS-使用ma-cli obs-copy命令复制OBS数据:命令示例

时间:2024-11-21 19:46:01

命令示例

# 上传文件到OBS中

$ ma-cli obs-copy ./test.csv obs://${your_bucket}/test-copy/
[ OK ] local src path: [ /home/ma-user/work/test.csv ]
[ OK ] obs dst path: [ obs://${your_bucket}/test-copy/ ]

# 上传文件夹到OBS中,对应上传到OBS的目录为obs://${your_bucket}/test-copy/data/

$ ma-cli obs-copy /home/ma-user/work/data/ obs://${your_bucket}/test-copy/
[ OK ] local src path: [ /home/ma-user/work/data/ ]
[ OK ] obs dst path: [ obs://${your_bucket}/test-copy/ ]

# 上传文件夹到OBS中,并指定--drop-last-dir,对应上传到OBS的目录为obs://${your_bucket}/test-copy/

$ ma-cli obs-copy /home/ma-user/work/data/ obs://${your_bucket}/test-copy/ --drop-last-dir
[ OK ] local src path: [ /home/ma-user/work/data ]
[ OK ] obs dst path: [ obs://${your_bucket}/test-copy/ ]

# 从OBS下载文件夹到本地磁盘中

$ ma-cli obs-copy obs://${your_bucket}/test-copy/ ~/work/test-data/
[ OK ] obs src path: [ obs://${your_bucket}/test-copy/ ]
[ OK ] local dst path: [ /home/ma-user/work/test-data/ ]

support.huaweicloud.com/usermanual-standard-modelarts/devtool-modelarts_0337.html