Kaçırılmayacak FIRSAT : Sınırsız Hosting Paketlerinde .COM Veya .COM.TR Sepette ÜCRETSİZ ! Ücretsiz .COM İçin Hemen TIKLAYIN !
Bizi Ara (10:00-18:00) Bize Soru Sor !
Bize Soru Sor ! Bizi Ara (10:00-18:00)
X

Please Select Country (Region)

Turkey (Türkçe)Turkey (Türkçe) Worldwide (English)Worldwide (English)
X
X

Please Select Country (Region)

Turkey (Türkçe)Turkey (Türkçe) Worldwide (English)Worldwide (English)
X

Guide to Taking Backups Using SSH with cPanel

Taking backups of your website and databases using cPanel is vital for data security. In this guide, you will learn how to take backups step by step, focusing on the keyword "cpanel ssh backup".

Activating SSH Access on cPanel

As a first step, we need to activate SSH access on cPanel. You must perform this process to take backups via SSH. You can enable SSH access by following the steps below:

  1. Log in to your cPanel account.
  2. Click on "SSH Access" in the Security section.
  3. Enable SSH access and note the connection information.
  4. Create SSH keys or import an existing key.

Once you have enabled SSH access, you are ready to connect to cPanel via SSH.

Steps to Connect to cPanel via SSH

You need to follow some basic steps to connect to cPanel via SSH. These steps can be performed using a terminal or command prompt:

  1. Open a terminal or command prompt.
  2. Connect to your server using the SSH command:
    ssh username@server_address
    For example:
    ssh [email protected]
  3. Complete authentication using your SSH key.
  4. Once you have successfully connected, you can access your server’s file system from the command prompt.

Now that you have connected to the cPanel server via SSH, you can start backing up.

Guide to Taking Backups Using SSH with cPanel

Commands Required for Backups in cPanel

You need to know some basic commands to take backups using SSH on cPanel. Here are the basic SSH commands you can use for backup:

  • tar: Used to archive and compress files and directories.
  • mysqldump: Used to backup MySQL databases.
  • scp: Used to securely copy backup files to another server or computer.

You can backup your website's files and databases using these commands.

Creating and Downloading a Backup File Using SSH

Follow these steps to create and download a backup file using SSH:

1. Backing Up Website Files

  1. Connect to your server via SSH.
  2. Go to the root directory of your website:
    cd /home/username/public_html
  3. Compress the website files:
    tar -czvf backup.tar.gz .

2. Backing Up MySQL Databases

  1. Connect to your server via SSH.
  2. To back up the MySQL database, use the following command:
    mysqldump -u username -p database_name > database_backup.sql

3. Downloading the Backup File

  1. To download the backup file to your local computer, use the following command:
    scp username@server_address:/path/to/backup.tar.gz /local/directory
    For example:
    scp [email protected]:/home/username/public_html/backup.tar.gz /Users/username/Desktop

Post-Backup Security and Control Procedures

After you complete the backup process, it is important to perform security and control procedures:

  • Security of Backup Files: Store backup files in a safe place and protect them from unauthorized access.
  • Integrity of Backup Files: Check the integrity of backup files. This will help you determine if the files are damaged.
  • Testing Backup Files: Test backup files regularly. This will ensure that backups can be restored if needed.

Frequently Asked Questions

1. Why is it important to back up with SSH?

Backing up with SSH offers a more secure and faster backup method. It also provides more flexibility and control because it provides direct access from the command line.

2. How can I restore a backup file?

To restore a backup file, you can connect to your server via SSH and restore the relevant files and databases. For example, you can extract files with the tar command and restore databases with the mysql command.

3. How can I generate SSH keys?

You can create SSH keys via cPanel or termi nal. You can generate an SSH key pair using the ssh-keygen command in the terminal.

4. How can I move a backup file to another server?

You can use the scp command to move a backup file to another server. This command allows you to securely copy files from one server to another.

5. What should I do if the backup file size is too large?

If the backup file size is too large, you can split the file into parts or increase the compression level. You can also keep the size of the backup file under control by repeating the backup process at regular intervals.