How Do I Change the Storage Path of a Migrated Object?
Choose a proper method based on the object quantity to change the path:
- Few objects
You can use the OBS Browser tool provided by the HUAWEI CLOUD OBS to move the data.
- Download OBS Browser. For details, see Downloading OBS Browser.
- Log in to OBS Browser, click the bucket from which you want to move the target objects (directories or files), and right-click the file or folder and choose Copy from the shortcut menu.
- Select a path to save the target objects. Right-click the path and choose Paste from the shortcut menu.
- A number of objects
You are advised to use the obsutil tool to change the object path.
- Download obsutil and initialize the tool. For details, see Downloading obsutil and Performing Initial Configuration.
- Use commands to move the object.
The following uses a Windows OS as an example:
- Run obsutil mv obs://src_bucket/key obs://dsc_bucket/dsc_path to move a single object.
- Run obsutil mv obs://src_bucket/prefix obs://dsc_bucket/dsc_path -f -r to move objects in batches.
For batch moving, prefix indicates the name prefix of the migrated object. The tool moves all the migrated objects matching that name prefix.
For more information about the obsutil commands, see Moving an Object.