How to compress files using cPanel or the command line?
This article describes two ways to compress files:
  • Using cPanel.
  • Using the command line.
Table of Contents
  • About file compression
  • Method #1: Use cPanel
  • Method #2: Use the command line

About file compression

Compressing files enables you to store files using less disk space. For example, if you have some files that you rarely use, it may be worth compressing them so they take up less space. Alternatively, if you need to transfer files to or from your hosting account, it is often easier (and faster) to compress multiple files into one compressed file and transfer that file instead. There are many types of compressed files: ZIPRARtargzip, and more. The following procedures demonstrate how to create some of these types of files.  

Method #1: Use cPanel

To compress files using cPanel, follow these steps:
  1. Log in to cPanel.
  2. Open the File Manager:
    • If you are using the Jupiter theme, on the Tools page, in the Files section, click File Manager:cPanel - File Manager icon (Jupiter theme)
    • If you are using the Paper Lantern theme, in the FILES section of the cPanel home page, click File Manager: cPanel - File Manager icon
  3. In the left sidebar, click the folder that contains the files you want to compress.
  4. To select multiple files:
    • Hold the Shift key and click to add a group of items to the currently selected items.
    • Hold the Ctrl key and click to add one item to the currently selected items.
  5. After you have selected all of the files you want to compress, on the top menu bar, click Compress:
  6. In the Compress dialog box, under Compression Type, select the type of compression to use.
    Zip Archive files are easily decompressed in Microsoft Windows. Other compression types may require additional applications to use in Windows.
  7. In the text box, type the name of the compressed archive file.
  8. Click Compress File(s).
  9. When compression is complete, the Compression Results dialog box appears.
  10. Click Close.
    To decompress a compressed file, right-click the file in File Manager, and then click Extract.

Method #2: Use the command line

There are many ways to compress files from the command line. The following procedure outlines a few of them:
  1. Log in to your account using SSH or by cPanel > Terminal.
  2. At the command prompt, type one of the following commands:
    • To create a ZIP file that contains all of the files in the current directory, type the following command:
      zip new.zip *
      • To also include any subdirectories and their files, use the -r option. For example:
        zip -r new.zip *
      • To decompress the .zip file, use the unzip command. For example:
        unzip new.zip
    • To create a tar file that contains all of the files in the current directory as well as any subdirectories, type the following command:
      tar cvf new.tar *
      To decompress a .tar file, use the x option instead of the c option. For example:
      tar xvf new.tar
    • To create a compressed gzip file, type the following command. Replace test.txt with the name of the file you want to compress. This command replaces the existing file with the compressed file (for example, test.txt becomes test.txt.gz):
      gzip test.txt
      • To compress all files in the current directory and all files in any subdirectories, use the -r option. For example:
        gzip -r .
      • To decompress a .gz file, use the gunzip command. For example:
        gunzip test.txt.gz

What is DMARC?

DMARC stands for “Domain-based Message Authentication, Reporting & Conformance”. It tells an email server what to do, after checking the validity of a domain name’s SPF and DKIM records.

How do I set up a DMARC Record in cPanel?

DMARC records are set up as TXT records inside cPanel. The steps are:
  1. Log in to cPanel.
  2. Click on the Zone Editor option.
  3. Click Manage next to the domain name you want to add the record for.
  4. Click the drop-down arrow next to the blue Add Record button, and select Add “DMARC” Record.
  5. Select a policy type to generate a record for.
    • If you already have chosen a DMARC record, click the Raw tab to enter your custom record.
  6. You may click Optional Parameters to further specify how your policy works. If you’re unsure how to use these, you can simply leave them at their default values.
  7. Input the DMARC record into the Record/Text field.
  8. Click Add Record.
  9. Allow for 2-8 hours to pass, while the change propagates.

How do I craft a specific DMARC Record?

Firstly, here is an example of what a DMARC record might look like.

"v=DMARC1;p=reject;pct=100;rua=mailto:[email protected]"

What does this all mean?
  • is equal to the protocol version
  • p is equal to the policy for the domain name
  • pct is equal to the percentage of messages that should be subject to filtering
  • rua determines where any reports should be sent to (aggregated reports).
There are a couple of more advanced options, that are not included in this simplified example.
  • ruf determines where “forensic reports” should be sent to.
  • sp is the policy for sub-domains
  • adkim sets the alignment mode for DKIM
  • aspf sets the alignment mode for SPF
The easiest way to create your own DMARC record is to use the generator in cPanel, to copy the above example and simply change the email address that reports will be sent to.In order to transfer the emails from the old mail provider to us, the following conditions are to be met:
  • Both mail services should still be active. Email client which supports IMAP/POP/SMTP protocol is installed.
  • The main idea of this method is to setup two email accounts – with old and new mail provider, and then drag-n-drop existing emails to new email server.
This guide contains step by step instructions of the process using Outlook email client.

1. Setup the email account hosted on the old server

If you don’t have the email account setup already in your email client, contact your previous email provider for setup instructions. If it is already set, you can skip this step.

2. Setup the email account hosted on the new server Now you should setup email account hosted with us.

NOTE 1: in order to be sure that correct server is configured we strongly recommend using hostnames as incoming outgoing servernames instead of mail.yourdomain.com subdomain.

NOTE 2: make sure email account hosted with us is setup as IMAP.
Once both accounts are set you should see them in your email client window. One of them should have all your existing emails (old email account) and the other one should be empty (new email account).
You are now ready for actual email transfer:

3. Email transfer from the old server to the new one
In order to transfer emails, select them in old account and drag-n-drop them to the new account folder:

Once all tasks are completed transfer is considered to be finished.
You can move single/multiple emails or even subfolders from one server to another at the same time.

We also recommend waiting for 24 hours after DNS records are changed to make sure the new emails are coming to new server. When all is good and setup properly, you can go ahead and remove the old account.
That’s it!

When to use rsync

The rsync program enables you to synchronize directories locally or between two computers. Rsync automatically determines which files are different or new between the two locations, and then synchronizes the directories. You can use this functionality to accomplish a number of tasks. For example, you can use rsync to back up your web site to another computer. Alternatively, suppose that you have a web site development environment already installed on another server. You could use rsync to deploy this environment to your Hostiso Hosting account.
If you are synchronizing directories between two separate computers, they both must have rsync installed.

How to use rsync

The rsync program has many features, but the following command-line options are enough to get started:
  • The -a option enables archive mode. In archive mode, rsync preserves all file permissions, ownership, and modification times.
  • The -e option specifies the remote shell to use. This is often set to ssh.
  • The -l option preserves any symbolic links.
    If you use the -a option, this option is enabled automatically.
  • The -r option makes rsync recurse through any subdirectories.
    If you use the -a option, this option is enabled automatically.
  • The -v option enables verbose mode, which means rsync displays information while it is running. (By default, rsync does not display any information.) You can omit this option, or to see even more detailed information, use the -vv option.
  • The -z option enables compression for file transfers.
Using these rsync options, we can go through some examples. Suppose you want to back up your web site files to another server. To do this, follow these steps:
  1. Log in to your account using SSH.
  2. To make sure you are in your home directory, type the following command:
    cd ~
  3. To back up (or “push”) your public_html directory to the user account on a remote server at example.com, type the following command:
    rsync -avz -e ssh public_html [email protected]:~/backup
    This command assumes that the remote server is running SSH on port 22. If you were backing up to another Hostiso Hosting server, for example, you would use the following command because SSH runs on port 7822:
    rsync -avz -e "ssh -p7822" public_html [email protected]:~/backup
  4. After rsync finishes, the user on the remote server at example.com has a backup/public_html directory in their account that is an exact copy of the public_html directory in your account.
Another common scenario is “pulling” files from a remote location. For example, you may have a development environment set up on a remote server. You could use rsync to pull files from the remote repository into your Hostiso Hosting account. With each subsequent “pull”, rsync will only update the files that have changed since the last update, thereby saving time and bandwidth. To do this, run the following command from your home directory:
rsync -avz -e ssh [email protected]:~/public_html .
After rsync finishes, your public_html directory contains a copy of the files in the remote server’s public_html directory.

More Information

This article is only a brief introduction to rsync‘s extensive capabilities. To view the official online documentation for the rsync program, please visit http://rsync.samba.org/documentation.html. In this tutorial we will help you to clean up your server from old user backups. cPanel users can generate backups of their accounts. These backups are saved in the root of users’ directories, like /home/username/backup.tar.gz. The filename format of the backups is backup-date_time_username.tar.gz. For example: backup-7.12.2018_19-32-49_hostiso.tar.gz The issue is that these backups take disk space and at some point you may see that your server is low on disk space. So, it’s a good idea to remove these backups from time to time. We recommend to notify your clients that you are removing backups (older than 7 days etc.) (more…)

We have some good news, from now on Hostiso support Node.js on all our services. As JavaScript became one of the most popular programming languages, more and more customers demand Node.js hosting. With Hostiso Node.js , your customers are now able to host their JavaScript apps using Node.js 6, 8, 9, 10. (more…)

If you wish to see your site before you change NS or DNS records you can do that easily by editing hosts file on your OS. This same way can be used for example to block load of site on your PC etc. Hosts files have been in use since ARPANET. They were used to resolve hosts names before DNS. hosts files would be massive documents used to aide the network name resolution. (more…) With Hostiso you can easily enable HTTPS redirection from HTTP for your site. We wish also to note that Hostiso offer FREE SSL for every account/domain, just request it from support/client area or during hosting order. (more…)Traceroute is a common diagnostic tool for displaying the route (path) and measuring transit delays of packets across a network. The traceroute command is available on most modern operating systems. Hostiso Support will frequently ask for the output of a traceroute if you are experiencing connectivity issues. (more…)cpanel-backup-restoreHow to create backup of cPanel Account over SSH? (more…)