migrate¶
Instance Migration Considerations¶
- The instance migration process will not migrate the
/hy-tmp/
directory in the instance, and will clear the data in the/hy-tmp/
directory in the instance. If you need to migrate, you need to put the/ in the instance The data in the hy-tmp/
directory is uploaded to the personal data space through the OSS command tool. - Before instance migration, you must shut down the instance first.
- If the
/hy-nas
directory is used, you also need to select an instance with "shared storage" when migrating. - There is no charge for instance migration.
Instance migration steps¶
- Back up the data in the
/hy-tmp/
directory of the instance, and upload it to the personal data space through the OSS command tool. - Shut down the instance through the Hengyuan cloud console.
- Click Instance Management to migrate.
- After the migration is complete, enter the instance, and use the OSS command tool to download the backed up data to the instance
/hy-tmp/
.
Instance migration process demo¶
1. Backup the data in the /hy-tmp/
directory in the instance, and upload it to the personal data space through the OSS command tool
#View the data in the /hy-tmp directory, I have 5 files and 5 directories here
root@I87f7d582c00801bcf:~# cd /hy-tmp/
root@I87f7d582c00801bcf:/hy-tmp# ls
dataset1 dataset2 dataset3 dataset4 dataset5 datasetDir1 datasetDir2 datasetDir3 datasetDir4 datasetDir5
#Package and compress the data in the /hy-tmp directory
root@I87f7d582c00801bcf:/hy-tmp# tar zpcf dataset.tar.gz ./*
#Upload the packaged data to the personal data space through OSS commands
root@I87f7d582c00801bcf:/hy-tmp# oss login
Username:139xxxxxxxx
Password:**********
139xxxxxxxx login successfully!
root@I87f7d582c00801bcf:/hy-tmp# oss cp dataset.tar.gz oss://
#Then check whether the personal data space is uploaded successfully
root@I87f7d582c00801bcf:/hy-tmp# oss ls -s -d oss://
Listing objects.
Object list:
oss://dataset.tar.gz #Here is the data file just uploaded
File number is: 1
2. Shut down the instance through the Hengyuan cloud console
3. Click to start migration instance
The migrated target instance is recommended to have the same GPU model as the current instance
It prompts that the /hy-tmp/ directory is cleared. If you do not have backup data, you should back up the data first, and then perform the migration.
4. Enter the instance and use the OSS command tool to download data to the current instance /hy-tmp/
directory
#Enter the /hy-tmp/ directory, and then log in to OSS
root@I87f7d582c00801bcf:~# cd /hy-tmp/
t@I87f7d582c00801bcf:/hy-tmp# oss login
Username:139xxxxxxxx
Password:**********
139xxxxxxxx login successfully!
#View OSS personal data space
root@I87f7d582c00801bcf:/hy-tmp# oss ls -s -d oss://
Listing objects.
Object list:
oss://dataset.tar.gz
File number is: 1
#Download dataset.tar.gz in the personal data space to the current directory in the instance
root@I87f7d582c00801bcf:/hy-tmp# oss cp oss://dataset.tar.gz ./
#View downloaded data
root@I87f7d582c00801bcf:/hy-tmp# ls
dataset.tar.gz
# Extract the data to the current directory
root@I87f7d582c00801bcf:/hy-tmp# tar zxvf dataset.tar.gz
#View the decompressed data file
root@I87f7d582c00801bcf:/hy-tmp# ls
dataset1 dataset2 dataset3 dataset4 dataset5 datasetDir1 datasetDir2 datasetDir3 datasetDir4 datasetDir5 dataset.tar.gz