How Do I Migrate a Linux Source Server as a Non-root User?
Scenarios
If you must use a non-root user account to perform the migration, ensure that the user has the required permissions before creating a migration task.
Procedure
- For a hypothetical user, test, check whether the user is included in /etc/passwd. If it is not, run the following two commands to add the user and set the password:
If it is, confirm that user test has a /home directory. If the user does not have a home directory, add one.
useradd -m test passwd test
- Modify the /etc/sudoers file.
- Add the following information to the end of the /etc/sudoers file based on the OS version:
- Debian and Ubuntu
test ALL=(ALL:ALL) ALL test ALL=(ALL:ALL) NOPASSWD:ALL
- Other distributions:
test ALL=(ALL) ALL test ALL=(ALL) NOPASSWD:ALL
- Debian and Ubuntu
- If Defaults requiretty is in the /etc/sudoers file, comment out it.
These modifications to the sudoers file enable the user to execute administrator level commands without entering a password. After the migration is completed, you need to remove the added lines, or an exception occurs.
- Add the following information to the end of the /etc/sudoers file based on the OS version:
- After the permissions are configured, switch to a regular account and run the following command to start the Agent:
sudo ./startup.sh
Product Consultation FAQs
- Can I Migrate Physical Servers and VMs from Other Clouds to Huawei Cloud Using SMS?
- Can I Migrate ECSs from Huawei Cloud to On-Premises Environments or Other Clouds Using SMS?
- Can I Ask Huawei Cloud Technical Support to Help Me Migrate Services?
- Does SMS Support Resumable Data Transfer?
- How Do I Migrate an ECS from One Account to Another?
- How Do I Migrate an ECS from One Region to Another Using SMS?
- Will My Services on the Source Server Be Interrupted During Migration?
- How Do I Create an AK/SK Pair for a Huawei Cloud Account?
- How Do I Create an AK/SK Pair for an IAM User?
- How Do I Migrate a Linux Source Server as a Non-root User?
- What Information Does SMS Collect About Source Servers?
- How Do I Select a Target Server?
- How Do I Create an ECS?
- What Is the Block-Level Migration?
- What are Valid Data Blocks?
- How Does Migration Using SMS Differ from Migration Using IMS?
- Why Is the OS Name of the Target ECS Displayed on the ECS Console Different from That of the Source Server?
- How Do I Determine Whether a Migration Is Complete?
- Can I Migrate Only Some Services on the Source Server?
- Can the Target Server Run a Different Type of OS from the Source Server?
- What Determines the Specifications of a Target Server?
- Which Download Option Should I Choose When I Download the Windows Agent?
- Can I Migrate a Source Server If There Is No Corresponding Image Available on Huawei Cloud?
- How Does SMS Differ from IMS in the Migration Scenario?
- How Do I Display the OS Name of a Target Server on the ECS Console?
- What Are the Snapshots of a Target Server Used for?
- In a Linux File-Level Migration, How Do I Exclude Directories from Migration and Synchronization?
- Will an Incremental Synchronization Overwrite Existing Data on a Launched Target Server?
- How Do I Create a Target Server that Meets the SMS Requirements?
- Can SMS Migrate Self-built Databases, Big Data Services, or Websites Deployed on a Source Server?
- Can the AK/SK of a Federated User (Virtual IAM User) Be Used for Authentication During the SMS-Agent Startup?
- How Do I Synchronize Files in Specific Directories After a Linux File-Level Migration Is Complete?
- Will the Migration Be Affected If the SSH Service Does Not Use Default Port 22 on the Source Server?
- How Do I Obtain the SMS Domain Name?
- How Many Resources Will Be Used for a Linux Block-Level Migration?
- How Do I Configure Data Compression for a Linux Block-Level Migration?
- Do I Need to Activate My Windows OS and Paid Software After the Migration?
- Why Does the Target Server Not Synchronize the Clocks on the Source Server?
- How Do I Set the Number of Concurrent Processes for Linux File-Level Migrations?
- Which Directories Are Not Synchronized by Default During Incremental Synchronization on a Linux Server?
- How Do I Verify Data Consistency Between the Source and Target Servers?
- Can I Use a Temporary AK/SK Pair for Migration?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more