Monthly Archives: May 2017

How to restore cPanel accounts in WHM

In this article we will discuss how to restore a full backup/cpmove file in WHM(Web Host Manager).  Full cPanel backups can be generated by the backup system at scheduled intervals, by running a shell command or by the end user in cPanel.

 

WHM Restore Full Backups WHM Restore Full Backups

To restore a full cPanel backup or cpmove file follow the steps:

  1. Log into your WHM account (yourdomainname.com:2087)
  2. Navigate to Backup -> Restore a Full Backup/cpmove FIle.
  3. Select the Options you want to use on restoration:
    Restricted Restore – for security, let this option checked

    Restricted Restore performs additional security checks on the backup file. If a component of the backup file has a security issue, the system will not restore that portion of the backup.

    Transfer Method: a. Restore with Username – if you have the backup file on the server. b. Restore with File – if you want to upload the archive from your computer
    Overwrite the existing user. – if you want to overwrite the exiting account
    Assign a Dedicated IP Address – if you want to assign an IP for the account (you must have free IPs on the server)

  4. Click the Restore button.  You will see the restoration process and any warnings/errors at the end. You can also use the Pause Queue and Abort buttons, if you want to pause or abort the process.

The cPanel backups/cpmove files must be in one of the directories:

/home, /home2, /home3, /root, /usr, /usr/home, /web

and must have one of the following file names:

cpmove-{user}
cpmove-{user}.tar
cpmove-{user}.tar.gz
{user}.tar
{user}.tar.gz
backup-{backup-date_time}_{user}.tar
backup-{backup-date_time}_{user}.tar.gz

And the YouTube video tutorial:

Share this post:

How to backup/restore a single cPanel account via SSH

cPanel allows you to backup and restore cPanel accounts with shell commands. We will show in this post the commands you need to use.

To backup a single cPanel account:

  1. Login on your server as root via SSH
  2. Run the command :
    /scripts/pkgacct user
  3. By default, the backup file (cpmove-user.tar.gz) will be created in the /home directory.

To restore a single cPanel account backup/cpmove file:

  1. Login on your server as root via SSH
  2. Run the command :
    /scripts/restorepkg user

    or

    /scripts/restorepkg path-to-backup-fle
  3. To run the command with the user value, you must be in the same directory with the archive file.

You can also use the WHM interface to restore backups. Check our KB article: How to restore cPanel accounts in WHM

For more details about the pkgacct and restorepkg scripts use:

/scripts/pkgacct --help

and

/scripts/restorepkg --help

==========

Example for creating a cpmove file:

root@www [~]# /scripts/pkgacct plothost
[2017-05-29 07:53:45 -0700] pkgacct started.
[2017-05-29 07:53:45 -0700] pkgacct version 10 - user : plothost - tarball: 1 - target mysql : default - split: 0 - incremental: 0 - homedir: 1 - mailman: 1 - backup: 0 - archive version: 3 - running with uid 0
[2017-05-29 07:53:45 -0700] pkgacct using '/usr/local/cpanel/3rdparty/bin/pigz -6 --processes 2 --blocksize 128 --rsyncable' to compress archives
[2017-05-29 07:53:45 -0700] pkgacct working dir : /home/cpmove-plothost
[2017-05-29 07:53:45 -0700] Copying Reseller Config...[2017-05-29 07:53:45 -0700]
[2017-05-29 07:53:45 -0700] Copying Reseller Packages and Features ...
[2017-05-29 07:53:45 -0700] Done
[2017-05-29 07:53:45 -0700] Copying Suspension Info (if needed)...[2017-05-29 07:53:45 -0700] Done
[2017-05-29 07:53:45 -0700] Copying SSL certificates, CSRs, and keys...[2017-05-29 07:53:45 -0700] Done
[2017-05-29 07:53:45 -0700] Storing SSL domain......[2017-05-29 07:53:45 -0700] Done
[2017-05-29 07:53:45 -0700] Copying Domain Keys....[2017-05-29 07:53:45 -0700] Done
[2017-05-29 07:53:45 -0700] Copying Counter Data....[2017-05-29 07:53:45 -0700] Done
[2017-05-29 07:53:45 -0700] Copying Bandwidth Data....Summary databases … done!
[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copying Dns Zones.......demo.plothost.com...[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copying Mail files....[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copying proftpd file....[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copying www logs.......log file sizes [2167853 byte(s)]......ftp.demo.plothost.com-ftp_log.offset......demo.plothost.com-ssl_log......demo.plothost.com-bytes_log......demo.plothost.com......ftp.demo.plothost.com-ftp_log......ftp.demo.plothost.com-ftp_log.offsetftpbytes...[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copy userdata...[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copy custom virtualhost templates...[2017-05-29 07:53:46 -0700] Done
[2017-05-29 07:53:46 -0700] Copying mailman lists and archives....[2017-05-29 07:53:46 -0700] Done copying mailman lists and archives.
[2017-05-29 07:53:46 -0700] Copying homedir.............
[2017-05-29 07:53:47 -0700] Done
[2017-05-29 07:53:47 -0700] Fixing up EA4 .htaccess blocks: /home/plothost/public_html/.htaccess  Done.
[2017-05-29 07:53:47 -0700] Calculating nobody files............
[2017-05-29 07:53:47 -0700] Done
[2017-05-29 07:53:47 -0700] Performing “Postgresql” component....
[2017-05-29 07:53:47 -0700] Completed “Postgresql” component.
[2017-05-29 07:53:47 -0700] Performing “Mysql” component....
[2017-05-29 07:53:48 -0700] Determining mysql dbs...warn [cpmysqladmin] SHOW GRANTS FAILED: show grants for 'plothost'@'www.plothost.com';
[2017-05-29 07:53:49 -0700] ...mysqldump version: 10.1.23...[2017-05-29 07:53:49 -0700] ...mysql version: 10.1...[2017-05-29 07:53:49 -0700] Saving mysql privs...[2017-05-29 07:53:49 -0700] Done
[2017-05-29 07:53:49 -0700] ...Done
[2017-05-29 07:53:49 -0700] Storing mysql dbs............
plothost_test[2017-05-29 07:53:49 -0700] (52811 bytes)
plothost_data1[2017-05-29 07:53:49 -0700] (1385 bytes)
plothost_22[2017-05-29 07:53:49 -0700] (1376 bytes)
plothost_wp519[2017-05-29 07:53:49 -0700] (40501 bytes)
roundcube.users,roundcube.identities,roundcube.contacts,roundcube.contactgroups[2017-05-29 07:53:49 -0700] (6616 bytes)
roundcube.contactgroupmembers[2017-05-29 07:53:49 -0700] (2423 bytes)
[2017-05-29 07:53:49 -0700] ...Done
[2017-05-29 07:53:49 -0700] Completed “Mysql” component.
[2017-05-29 07:53:49 -0700] Copying cpuser file.......[2017-05-29 07:53:49 -0700] Done
[2017-05-29 07:53:49 -0700] Copying crontab file.......[2017-05-29 07:53:49 -0700] Done
[2017-05-29 07:53:49 -0700] Performing “Quota” component....
[2017-05-29 07:53:49 -0700] Completed “Quota” component.
[2017-05-29 07:53:49 -0700] Performing “Integration” component....
[2017-05-29 07:53:49 -0700] Completed “Integration” component.
[2017-05-29 07:53:49 -0700] Performing “AuthnLinks” component....
[2017-05-29 07:53:50 -0700] Completed “AuthnLinks” component.
[2017-05-29 07:53:50 -0700] Performing “APITokens” component....
[2017-05-29 07:53:50 -0700] Completed “APITokens” component.
[2017-05-29 07:53:50 -0700] Storing Subdomains....
[2017-05-29 07:53:50 -0700] Done
[2017-05-29 07:53:50 -0700] Storing Parked Domains....
[2017-05-29 07:53:50 -0700] Done
[2017-05-29 07:53:50 -0700] Storing Addon Domains....
[2017-05-29 07:53:50 -0700] Copying password.......[2017-05-29 07:53:50 -0700] Done
[2017-05-29 07:53:50 -0700] Copying shell.......[2017-05-29 07:53:50 -0700] Done
[2017-05-29 07:53:50 -0700] Creating Archive ............................................
[2017-05-29 07:53:54 -0700]
[2017-05-29 07:53:54 -0700] One or more files in the home directory were not readable and were not copied.  Please review the home directory upon completion of transfer
[2017-05-29 07:53:54 -0700] WARN: Warnings(s) encountered in tar during archiving:
[2017-05-29 07:53:54 -0700] /home/plothost/public_html/.swp: Cannot open file: Permission denied at /scripts/pkgacct line 1501.
[2017-05-29 07:53:54 -0700] /home/plothost/.pki: Cannot open file: Permission denied at /scripts/pkgacct line 1501.[2017-05-29 07:53:54 -0700] Done
[2017-05-29 07:53:54 -0700] pkgacctfile is: /home/cpmove-plothost.tar.gz
[2017-05-29 07:53:54 -0700] md5sum is: 79e274e663f8077af40d116477355fc2
[2017-05-29 07:53:54 -0700]
[2017-05-29 07:53:54 -0700] size is: 36933547
[2017-05-29 07:53:54 -0700]
[2017-05-29 07:53:54 -0700] homesize is: 98103296
[2017-05-29 07:53:54 -0700]
[2017-05-29 07:53:54 -0700] homefiles is: 9540
[2017-05-29 07:53:54 -0700] pkgacct completed
root@www [~]#

Example for restoring a cpmove file:

root@www [/home]# /scripts/restorepkg cpmove-plothost.tar.gz
Attempting restoration of the account backup “cpmove-plothost.tar.gz” (user: plothost) …
cPanel restorepkg version: 2.3
Archive user: plothost
Restricted: no
Allow Reseller Privileges: no

The system will attempt to restore the archive file “/home/cpmove-plothost.tar.gz”.
----------------------------------------------------------------------
You have successfully enqueued this account’s restoration. This restoration’s ID is “wwwplothostcoresto20170529160558ZHS8”.

You can see the progress of this restoration below. If you need to show this again, run the following command:

/usr/local/cpanel/bin/view_transfer wwwplothostcoresto20170529160558ZHS8
----------------------------------------------------------------------
The transfer with the session id, “wwwplothostcoresto20170529160558ZHS8” is running with PID “11641”.
[ 11641][MASTER    ]: Start Session
[ 11641][MASTER    ]: Version: 2.3
[ 11641][MASTER    ]: Queue “RESTORE” items: 1
[ 11641][MASTER    ]: Remote Host:
[ 11642][RESTORE:1 ]: Starting “Account”: plothost
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 0%
[ 11642][RESTORE:1 ][A:plothost        ]: Starting “RESTORE” for “Account” “plothost”.
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 10%
[ 11642][RESTORE:1 ][A:plothost        ]: Restore File: /home/cpmove-plothost.tar.gz
[ 11642][RESTORE:1 ][A:plothost        ]: Restore Reseller Privs: no
[ 11642][RESTORE:1 ][A:plothost        ]: Restricted mode: no
[ 11642][RESTORE:1 ][A:plothost        ]: Express mode: no
[ 11642][RESTORE:1 ][A:plothost        ]: Target “/home” on host “www.plothost.com” has 10.91 GB free and requires at least 105.67 MB free, which includes space for temporary files.
[ 11642][RESTORE:1 ][A:plothost        ]: The “Reseller” restore module has the following areas disabled by request: “all”
[ 11642][RESTORE:1 ][A:plothost        ]: ArchiveManager
[ 11642][RESTORE:1 ][A:plothost        ]:               Preparing archive for restoration …
[ 11642][RESTORE:1 ][A:plothost        ]:               Calculating disk space needed …
[ 11642][RESTORE:1 ][A:plothost        ]:               Done.
[ 11642][RESTORE:1 ][A:plothost        ]:               Target “/home/cpanelpkgrestore.TMP.work.IEt9l3U2/unsafe_to_read_archive” on host “www.plothost.com” has 10.91 GB free and requires at least 105.67 MB free, which includes space for temporary files.
[ 11642][RESTORE:1 ][A:plothost        ]:               This archive’s payload appears to be in the archive’s “cpmove-plothost” directory.
[ 11642][RESTORE:1 ][A:plothost        ]:       ArchiveManager
[ 11642][RESTORE:1 ][A:plothost        ]:       The system successfully prepared the archive for restoration.
[ 11642][RESTORE:1 ][A:plothost        ]: PreRestoreActions
[ 11642][RESTORE:1 ][A:plothost        ]:       PreRestoreActions
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 15%
[ 11642][RESTORE:1 ][A:plothost        ]: Account
[ 11642][RESTORE:1 ][A:plothost        ]:       Force Mode: no
[ 11642][RESTORE:1 ][A:plothost        ]:       Dedicated IP Address: no
[ 11642][RESTORE:1 ][A:plothost        ]:       Account
[ 11642][RESTORE:1 ][A:plothost        ]:       Account created
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 21%
[ 11642][RESTORE:1 ][A:plothost        ]: IPAddress
[ 11642][RESTORE:1 ][A:plothost        ]:       IPAddress
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 22%
[ 11642][RESTORE:1 ][A:plothost        ]: CpUser
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring cPanel user file.
[ 11642][RESTORE:1 ][A:plothost        ]:               Updating Caches …
[ 11642][RESTORE:1 ][A:plothost        ]:       CpUser
[ 11642][RESTORE:1 ][A:plothost        ]:       CpUser data restored
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 23%
[ 11642][RESTORE:1 ][A:plothost        ]: Package
[ 11642][RESTORE:1 ][A:plothost        ]:       Package
[ 11642][RESTORE:1 ][A:plothost        ]:       The package exists on the system.
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 24%
[ 11642][RESTORE:1 ][A:plothost        ]: FeatureList
[ 11642][RESTORE:1 ][A:plothost        ]:       FeatureList
[ 11642][RESTORE:1 ][A:plothost        ]:       Feature list exists.
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 26%
[ 11642][RESTORE:1 ][A:plothost        ]: Homedir
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Homedir…
[ 11642][RESTORE:1 ][A:plothost        ]:       Homedir
[ 11642][RESTORE:1 ][A:plothost        ]:       Homedir restored
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 34%
[ 11642][RESTORE:1 ][A:plothost        ]: OldHomedirs
[ 11642][RESTORE:1 ][A:plothost        ]:               Linking old home directories
[ 11642][RESTORE:1 ][A:plothost        ]:       OldHomedirs
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 36%
[ 11642][RESTORE:1 ][A:plothost        ]: Domains
[ 11642][RESTORE:1 ][A:plothost        ]:               Retrieving and sanitizing main userdata …
[ 11642][RESTORE:1 ][A:plothost        ]:               Parsing domain databases …
[ 11642][RESTORE:1 ][A:plothost        ]:               …Subdomains…
[ 11642][RESTORE:1 ][A:plothost        ]:               …ParkedDomains…
[ 11642][RESTORE:1 ][A:plothost        ]:               …AddonDomains…
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Domains …
[ 11642][RESTORE:1 ][A:plothost        ]:       Domains
[ 11642][RESTORE:1 ][A:plothost        ]:       Domains restored
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 37%
[ 11642][RESTORE:1 ][A:plothost        ]: Counter
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Counter Data
[ 11642][RESTORE:1 ][A:plothost        ]:       Counter
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 38%
[ 11642][RESTORE:1 ][A:plothost        ]: CustomLocale
[ 11642][RESTORE:1 ][A:plothost        ]:       CustomLocale
[ 11642][RESTORE:1 ][A:plothost        ]:       OK
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 39%
[ 11642][RESTORE:1 ][A:plothost        ]: NobodyFiles
[ 11642][RESTORE:1 ][A:plothost        ]:       NobodyFiles
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 41%
[ 11642][RESTORE:1 ][A:plothost        ]: VhostIncludes
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring custom virtualhost templates…
[ 11642][RESTORE:1 ][A:plothost        ]:       VhostIncludes
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 42%
[ 11642][RESTORE:1 ][A:plothost        ]: MailFix
[ 11642][RESTORE:1 ][A:plothost        ]:               Fixing mail permissions
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               Converting to maildir if needed
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               Rescanning mailboxes for full text search (FTS) if needed
[ 11642][RESTORE:1 ][A:plothost        ]:               The 'cpanel-dovecot-solr' rpm is not installed. Full text search rescan not possible
[ 11642][RESTORE:1 ][A:plothost        ]:       MailFix
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 43%
[ 11642][RESTORE:1 ][A:plothost        ]: Horde
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Horde (if any)
[ 11642][RESTORE:1 ][A:plothost        ]:               Updating the horde configuration.
[ 11642][RESTORE:1 ][A:plothost        ]:               Running database checks for 1 account(s) …
[ 11642][RESTORE:1 ][A:plothost        ]:               Running horde-db-migrate for “plothost”.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system is archiving the Horde data to the “/home/plothost/.cphorde/meta/horde.backup.sql.20170529” file.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system is cleaning the old Horde data archives.
[ 11642][RESTORE:1 ][A:plothost        ]:               ------------------------------------------------------------------------
[ 11642][RESTORE:1 ][A:plothost        ]:               Summary:
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               Ran database checks on 1 account(s).
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               There were 0 accounts with failures during this process (see above):
[ 11642][RESTORE:1 ][A:plothost        ]:                   n/a
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               There were 1 accounts successfully processed:
[ 11642][RESTORE:1 ][A:plothost        ]:                   plothost
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               There were 0 accounts that did not need any work done:
[ 11642][RESTORE:1 ][A:plothost        ]:                   n/a
[ 11642][RESTORE:1 ][A:plothost        ]:       Horde
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 44%
[ 11642][RESTORE:1 ][A:plothost        ]: Reseller
[ 11642][RESTORE:1 ][A:plothost        ]:       Reseller
[ 11642][RESTORE:1 ][A:plothost        ]:       The “Reseller” restore module has been skipped because it was disabled by request.
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 45%
[ 11642][RESTORE:1 ][A:plothost        ]: Password
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring password …
[ 11642][RESTORE:1 ][A:plothost        ]:               Password for “plothost” has been changed.
[ 11642][RESTORE:1 ][A:plothost        ]:       Password
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 46%
[ 11642][RESTORE:1 ][A:plothost        ]: BandwidthData
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Bandwidth Data
[ 11642][RESTORE:1 ][A:plothost        ]:               Importing legacy RRD data …
[ 11642][RESTORE:1 ][A:plothost        ]:       BandwidthData
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 50%
[ 11642][RESTORE:1 ][A:plothost        ]: Shell
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring shell
[ 11642][RESTORE:1 ][A:plothost        ]:               Setting the user’s shell to “/usr/local/cpanel/bin/jailshell” …
[ 11642][RESTORE:1 ][A:plothost        ]:       Shell
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 51%
[ 11642][RESTORE:1 ][A:plothost        ]: SSL
[ 11642][RESTORE:1 ][A:plothost        ]:       …harvesting SSL files to install for demo.plothost.com…
[ 11642][RESTORE:1 ][A:plothost        ]:       The SSL certificate is now installed onto the domain “demo.plothost.com” using the IP address “162.255.165.197”. Apache is restarting in the background.
[ 11642][RESTORE:1 ][A:plothost        ]:       SSL
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 52%
[ 11642][RESTORE:1 ][A:plothost        ]: DKIM
[ 11642][RESTORE:1 ][A:plothost        ]:       DKIM
[ 11642][RESTORE:1 ][A:plothost        ]:       DKIM restored
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 54%
[ 11642][RESTORE:1 ][A:plothost        ]: Ftp
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring ftp password file
[ 11642][RESTORE:1 ][A:plothost        ]:               Resyncing FTP Passwords
[ 11642][RESTORE:1 ][A:plothost        ]:               1
[ 11642][RESTORE:1 ][A:plothost        ]:       Ftp
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Mailman
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Mailman lists
[ 11642][RESTORE:1 ][A:plothost        ]:       Mailman
[ 11642][RESTORE:1 ][A:plothost        ]:       Mailman Restored
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 55%
[ 11642][RESTORE:1 ][A:plothost        ]: Integration
[ 11642][RESTORE:1 ][A:plothost        ]:       Integration
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 57%
[ 11642][RESTORE:1 ][A:plothost        ]: DigestShadow
[ 11642][RESTORE:1 ][A:plothost        ]:       DigestShadow
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 58%
[ 11642][RESTORE:1 ][A:plothost        ]: userdata
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring userdata…
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring userdata for “demo.plothost.com” …
[ 11642][RESTORE:1 ][A:plothost        ]:       userdata
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 59%
[ 11642][RESTORE:1 ][A:plothost        ]: Postgres
[ 11642][RESTORE:1 ][A:plothost        ]:               Preparing PostgreSQL restore …
[ 11642][RESTORE:1 ][A:plothost        ]:               This system does not have PostgreSQL.
[ 11642][RESTORE:1 ][A:plothost        ]:       Postgres
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 62%
[ 11642][RESTORE:1 ][A:plothost        ]: Logs
[ 11642][RESTORE:1 ][A:plothost        ]:       Logs
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 64%
[ 11642][RESTORE:1 ][A:plothost        ]: Unsuspend
[ 11642][RESTORE:1 ][A:plothost        ]:               Unsuspending .htaccess files for domains demo.plothost.com.
[ 11642][RESTORE:1 ][A:plothost        ]:       Unsuspend
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 65%
[ 11642][RESTORE:1 ][A:plothost        ]: Roundcube
[ 11642][RESTORE:1 ][A:plothost        ]:       The system will create a temporary database named “cptmpdb_plothost_99pS9Hnp01igEI9O” to import the Roundcube data.
[ 11642][RESTORE:1 ][A:plothost        ]:       Restoring the database “roundcube” as “cptmpdb_plothost_99pS9Hnp01igEI9O” …
[ 11642][RESTORE:1 ][A:plothost        ]:       The system has created a new database named “cptmpdb_plothost_99pS9Hnp01igEI9O”.
[ 11642][RESTORE:1 ][A:plothost        ]:       Granting “plothost” access to “cptmpdb_plothost_99pS9Hnp01igEI9O” with temporary password …
[ 11642][RESTORE:1 ][A:plothost        ]:       Spawning restoration subprocess for “cptmpdb_plothost_99pS9Hnp01igEI9O” …
[ 11642][RESTORE:1 ][A:plothost        ]:       Connecting to MySQL server as “plothost” in order to restore “cptmpdb_plothost_99pS9Hnp01igEI9O” …
[ 11642][RESTORE:1 ][A:plothost        ]:       Releasing objects in preparation for database restore for “cptmpdb_plothost_99pS9Hnp01igEI9O” …
[ 11642][RESTORE:1 ][A:plothost        ]:       Cleaning up in preparation for database restore for “cptmpdb_plothost_99pS9Hnp01igEI9O” …
[ 11642][RESTORE:1 ][A:plothost        ]:       Restoring database data for “cptmpdb_plothost_99pS9Hnp01igEI9O” …
[ 11642][RESTORE:1 ][A:plothost        ]:       The database restoration subprocess for “cptmpdb_plothost_99pS9Hnp01igEI9O” is running …
[ 11642][RESTORE:1 ][A:plothost        ]:       The database restoration subprocess for “cptmpdb_plothost_99pS9Hnp01igEI9O” has opened the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:       The database restoration subprocess for “cptmpdb_plothost_99pS9Hnp01igEI9O” has closed the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:       The database restoration subprocess for “cptmpdb_plothost_99pS9Hnp01igEI9O” has ended.
[ 11642][RESTORE:1 ][A:plothost        ]:       The system has restored the contents of the database “cptmpdb_plothost_99pS9Hnp01igEI9O”.
[ 11642][RESTORE:1 ][A:plothost        ]:       Merging grants from the temporary database named “cptmpdb_plothost_99pS9Hnp01igEI9O” into Roundcube …
[ 11642][RESTORE:1 ][A:plothost        ]:       Merging data from the temporary database named “cptmpdb_plothost_99pS9Hnp01igEI9O” into Roundcube.
[ 11642][RESTORE:1 ][A:plothost        ]:       Resolving Roundcube uids.
[ 11642][RESTORE:1 ][A:plothost        ]:       Dropping the temporary database named “cptmpdb_plothost_99pS9Hnp01igEI9O”.
[ 11642][RESTORE:1 ][A:plothost        ]:       Roundcube
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 66%
[ 11642][RESTORE:1 ][A:plothost        ]: WebDiskHomedir
[ 11642][RESTORE:1 ][A:plothost        ]:       WebDiskHomedir
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 67%
[ 11642][RESTORE:1 ][A:plothost        ]: PublicHtmlSymlinks
[ 11642][RESTORE:1 ][A:plothost        ]:       PublicHtmlSymlinks
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 68%
[ 11642][RESTORE:1 ][A:plothost        ]: FileProtect
[ 11642][RESTORE:1 ][A:plothost        ]:       FileProtect
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 70%
[ 11642][RESTORE:1 ][A:plothost        ]: Mail
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring Mail files
[ 11642][RESTORE:1 ][A:plothost        ]:               Resetting Quotas to sane values
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:       Mail
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: BackupConfig
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring backup config …
[ 11642][RESTORE:1 ][A:plothost        ]:               Updated backup config for “plothost”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring legacy backup config …
[ 11642][RESTORE:1 ][A:plothost        ]:               Updated legacy backup config for “plothost”.
[ 11642][RESTORE:1 ][A:plothost        ]:       BackupConfig
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 72%
[ 11642][RESTORE:1 ][A:plothost        ]: Cron
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring crontab
[ 11642][RESTORE:1 ][A:plothost        ]:       Cron
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 73%
[ 11642][RESTORE:1 ][A:plothost        ]: Mysql
[ 11642][RESTORE:1 ][A:plothost        ]:               Preparing MySQL restore …
[ 11642][RESTORE:1 ][A:plothost        ]:               Databases owned by “plothost” will be overwritten on conflict.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring MySQL databases
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring the database “plothost_test” as “plothost_test” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has created a new database named “plothost_test”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Granting “plothost” access to “plothost_test” with temporary password …
[ 11642][RESTORE:1 ][A:plothost        ]:               Spawning restoration subprocess for “plothost_test” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Connecting to MySQL server as “plothost” in order to restore “plothost_test” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Releasing objects in preparation for database restore for “plothost_test” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Cleaning up in preparation for database restore for “plothost_test” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring database data for “plothost_test” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_test” is running …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_test” has opened the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_test” has closed the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_test” has ended.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has restored the contents of the database “plothost_test”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring the database “plothost_22” as “plothost_22” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has created a new database named “plothost_22”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Granting “plothost” access to “plothost_22” with temporary password …
[ 11642][RESTORE:1 ][A:plothost        ]:               Spawning restoration subprocess for “plothost_22” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Connecting to MySQL server as “plothost” in order to restore “plothost_22” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Releasing objects in preparation for database restore for “plothost_22” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Cleaning up in preparation for database restore for “plothost_22” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring database data for “plothost_22” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_22” is running …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_22” has opened the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_22” has closed the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_22” has ended.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has restored the contents of the database “plothost_22”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring the database “plothost_wp115” as “plothost_wp115” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has created a new database named “plothost_wp115”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Granting “plothost” access to “plothost_wp115” with temporary password …
[ 11642][RESTORE:1 ][A:plothost        ]:               Spawning restoration subprocess for “plothost_wp115” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Connecting to MySQL server as “plothost” in order to restore “plothost_wp115” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Releasing objects in preparation for database restore for “plothost_wp115” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Cleaning up in preparation for database restore for “plothost_wp115” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring database data for “plothost_wp115” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_wp115” is running …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_wp115” has opened the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_wp115” has closed the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_wp115” has ended.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has restored the contents of the database “plothost_wp115”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring the database “plothost_data1” as “plothost_data1” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has created a new database named “plothost_data1”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Granting “plothost” access to “plothost_data1” with temporary password …
[ 11642][RESTORE:1 ][A:plothost        ]:               Spawning restoration subprocess for “plothost_data1” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Connecting to MySQL server as “plothost” in order to restore “plothost_data1” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Releasing objects in preparation for database restore for “plothost_data1” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Cleaning up in preparation for database restore for “plothost_data1” …
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring database data for “plothost_data1” …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_data1” is running …
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_data1” has opened the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_data1” has closed the SQL archive.
[ 11642][RESTORE:1 ][A:plothost        ]:               The database restoration subprocess for “plothost_data1” has ended.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system has restored the contents of the database “plothost_data1”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring MySQL database mappings
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring MySQL privileges
[ 11642][RESTORE:1 ][A:plothost        ]:               Database users owned by “plothost” will be overwritten on conflict.
[ 11642][RESTORE:1 ][A:plothost        ]:               The system will restore the database user “plothost” as “plothost2” because another cPanel user owns “plothost”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring MySQL grants
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring MySQL access hosts
[ 11642][RESTORE:1 ][A:plothost        ]:               Storing MySQL Grants
[ 11642][RESTORE:1 ][A:plothost        ]:       Mysql
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 77%
[ 11642][RESTORE:1 ][A:plothost        ]: Subaccount
[ 11642][RESTORE:1 ][A:plothost        ]:       Subaccount
[ 11642][RESTORE:1 ][A:plothost        ]:       Ran Subaccount database checks
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 78%
[ 11642][RESTORE:1 ][A:plothost        ]: Tomcat
[ 11642][RESTORE:1 ][A:plothost        ]:       Tomcat
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Htaccess
[ 11642][RESTORE:1 ][A:plothost        ]:       Htaccess
[ 11642][RESTORE:1 ][A:plothost        ]:       EasyApache4 was repaired in .htaccess files.
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 80%
[ 11642][RESTORE:1 ][A:plothost        ]: ZoneFile
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring DNS zones
[ 11642][RESTORE:1 ][A:plothost        ]:               Fetching existing zones.
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring zone: “demo.plothost.com”.
[ 11642][RESTORE:1 ][A:plothost        ]:               Cluster Zone Updates: “demo.plothost.com”
[ 11642][RESTORE:1 ][A:plothost        ]:       ZoneFile
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 81%
[ 11642][RESTORE:1 ][A:plothost        ]: MailRouting
[ 11642][RESTORE:1 ][A:plothost        ]:               Update mail routing
[ 11642][RESTORE:1 ][A:plothost        ]:               LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for demo.plothost.com's mail.This configuration has been manually selected.
[ 11642][RESTORE:1 ][A:plothost        ]:       MailRouting
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 82%
[ 11642][RESTORE:1 ][A:plothost        ]: SPF
[ 11642][RESTORE:1 ][A:plothost        ]:               Updating SPF Records
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]:       SPF
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 83%
[ 11642][RESTORE:1 ][A:plothost        ]: ProxySubdomains
[ 11642][RESTORE:1 ][A:plothost        ]:       ProxySubdomains
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 85%
[ 11642][RESTORE:1 ][A:plothost        ]: PostRestoreActions
[ 11642][RESTORE:1 ][A:plothost        ]:               Updating Caches …
[ 11642][RESTORE:1 ][A:plothost        ]:               Updating Nameserver IP Address Report
[ 11642][RESTORE:1 ][A:plothost        ]:               Syncing contact information
[ 11642][RESTORE:1 ][A:plothost        ]:               Refreshing vhosts and restarting apache
[ 11642][RESTORE:1 ][A:plothost        ]:       PostRestoreActions
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 86%
[ 11642][RESTORE:1 ][A:plothost        ]: Quota
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring quota
[ 11642][RESTORE:1 ][A:plothost        ]:       Quota
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 87%
[ 11642][RESTORE:1 ][A:plothost        ]: AuthnLinks
[ 11642][RESTORE:1 ][A:plothost        ]:               Restoring AuthnLinks
[ 11642][RESTORE:1 ][A:plothost        ]:       AuthnLinks
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 88%
[ 11642][RESTORE:1 ][A:plothost        ]: APITokens
[ 11642][RESTORE:1 ][A:plothost        ]:       APITokens
[ 11642][RESTORE:1 ][A:plothost        ]:
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 90%
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 92%
[ 11642][RESTORE:1 ][A:plothost        ]: Progress: 100%
[ 11642][RESTORE:1 ][A:plothost        ]:       Success.
[ 11642][RESTORE:1 ]: Account “plothost”: Success
[ 11642][RESTORE:1 ]: Progress: 100%
[ 11642][RESTORE:1 ]: Child Complete
[ 11641][MASTER    ]: Session Complete
Share this post:

How to get the size of a directory in Linux

Many times do you want to know the size of a directory. The most common Linux command is du.

We will list below some examples. At the end of the post you can see the du syntax.

– get the size of a specific directory/file

root@web [~]# du -sh path-to-directory-or-file/
root@web [~]# du -sh public_html
8.0K    public_html
root@web [~]#

– get the size of the current directory

root@web [~]# du -sh
root@web [~]# du -sh
37M     .
root@web [~]#

– get the size for files and folders in the current directory; or you can choose the depth=2,3 etc

root@web [~]# du -ah --max-depth=1
root@web [~]# du -ah --max-depth=1
4.0K    ./.libnet-openssh-perl
4.0K    ./.rnd
4.0K    ./.lesshst
44K     ./.bwusage.sqlite
40K     ./php.ini.orig
4.0K    ./perl5
4.0K    ./out
588K    ./support
388K    ./.cpanm
4.0K    ./error_log
4.0K    ./.accesshash
.....

– get the s size of files and folders with the date they were last modified

root@web [~]# du -ah --max-depth=1 --time
root@web [~]# du -ah --max-depth=1 --time
4.0K    2015-08-25 03:01        ./.libnet-openssh-perl
4.0K    2017-05-27 07:04        ./.rnd
4.0K    2017-05-27 14:37        ./.lesshst
44K     2016-01-04 01:15        ./.bwusage.sqlite
40K     2016-08-09 05:00        ./php.ini.orig
4.0K    2015-09-23 13:46        ./perl5
4.0K    2015-11-09 13:47        ./out
588K    2016-12-08 14:21        ./support
388K    2015-09-22 13:37        ./.cpanm
4.0K    2017-03-16 12:53        ./error_log
4.0K    2015-08-24 11:33        ./.accesshash
......

– sort subdirectories by size

root@web [~]#  du -h --max-depth=1 | sort -hr
root@web [~]# du -h --max-depth=1 | sort -hr
37M     .
14M     ./.cpanel
2.2M    ./.spamassassin
2.1M    ./tmp
748K    ./.MirrorSearch
588K    ./support
388K    ./.cpanm
40K     ./.gnupg
20K     ./.cpobjcache
20K     ./.HttpRequest
12K     ./cpanel3-skel
8.0K    ./public_html
8.0K    ./.pki
4.0K    ./public_ftp
4.0K    ./perl5
4.0K    ./.ssh
4.0K    ./.libnet-openssh-perl
root@web [~]#
If you have a lot of files/directories use du | more or du | less commands.

The syntax for the du command is:

root@web [~]# du --help
Usage: du [OPTION]... [FILE]...
  or:  du [OPTION]... --files0-from=F
Summarize disk usage of each FILE, recursively for directories.

Mandatory arguments to long options are mandatory for short options too.
  -0, --null            end each output line with 0 byte rather than newline
  -a, --all             write counts for all files, not just directories
      --apparent-size   print apparent sizes, rather than disk usage; although
                          the apparent size is usually smaller, it may be
                          larger due to holes in ('sparse') files, internal
                          fragmentation, indirect blocks, and the like
  -B, --block-size=SIZE  scale sizes by SIZE before printing them; e.g.,
                           '-BM' prints sizes in units of 1,048,576 bytes;
                           see SIZE format below
  -b, --bytes           equivalent to '--apparent-size --block-size=1'
  -c, --total           produce a grand total
  -D, --dereference-args  dereference only symlinks that are listed on the
                          command line
  -d, --max-depth=N     print the total for a directory (or file, with --all)
                          only if it is N or fewer levels below the command
                          line argument;  --max-depth=0 is the same as
                          --summarize
      --files0-from=F   summarize disk usage of the
                          NUL-terminated file names specified in file F;
                          if F is -, then read names from standard input
  -H                    equivalent to --dereference-args (-D)
  -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)
      --inodes          list inode usage information instead of block usage
  -k                    like --block-size=1K
  -L, --dereference     dereference all symbolic links
  -l, --count-links     count sizes many times if hard linked
  -m                    like --block-size=1M
  -P, --no-dereference  don't follow any symbolic links (this is the default)
  -S, --separate-dirs   for directories do not include size of subdirectories
      --si              like -h, but use powers of 1000 not 1024
  -s, --summarize       display only a total for each argument
  -t, --threshold=SIZE  exclude entries smaller than SIZE if positive,
                          or entries greater than SIZE if negative
      --time            show time of the last modification of any file in the
                          directory, or any of its subdirectories
      --time=WORD       show time as WORD instead of modification time:
                          atime, access, use, ctime or status
      --time-style=STYLE  show times using STYLE, which can be:
                            full-iso, long-iso, iso, or +FORMAT;
                            FORMAT is interpreted like in 'date'
  -X, --exclude-from=FILE  exclude files that match any pattern in FILE
      --exclude=PATTERN    exclude files that match PATTERN
  -x, --one-file-system    skip directories on different file systems
      --help     display this help and exit
      --version  output version information and exit

Display values are in units of the first available SIZE from --block-size,
and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.
Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

SIZE is an integer and optional unit (example: 10M is 10*1024*1024).  Units
are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (powers of 1000).

GNU coreutils online help: http://www.gnu.org/software/coreutils/
Report du translation bugs to http://translationproject.org/team/
For complete documentation, run: info coreutils 'du invocation'
root@web [~]#
Share this post:

How to enable gzip compression (Apache mod_deflate) in cPanel

To speed up loading times for your site and to save bandwidth, you can enable gzip compression. This means that content of your site will be served by the Apache Web Server in a compressed form.

Please notice that the Apache mod_deflate module must be installed on the server. Contact your host if you are unsure.

cPanel Optimize Website cPanel Optimize Website

To enable the gzip compression for your site, follow the steps:

  1. Go to yourdomain.com/cpanel and log in
  2. Look for Optimize Website entry (SOFTWARE cPanel section)
  3. Here you have 3 options:
    Disabled – which will disable the compression
    Compress All Content – with this option all content will be compressed
    Compress the specified MIME types – here, you will be able to input only certain MIME file types.
  4. So, choose the second option and click the Update Settings button. A confirmation message will appear: Website optimization preferences updated. Content compression is now enabled. Content compression is now enabled for all content.
  5. Your site is using now the gzip compression.
You can test if the gzip compression is working on your site at http://www.gziptest.com/ .

And the video tutorial:

 

Resources:
Apache Module mod_deflate

Share this post:

Add an email account in Windows Mail

Windows Mail/Mail is the default email client that comes with Windows 7/8/10. Here we will show you how to add an email account to it.

Windows Mail Windows Mail

How to add an email account to Mail :

1. Start the Mail program.
2. Click the Accounts button from the left menu, then click the +Add account button
windows mail 2

3. In the next window, chose the account type you want to add – in our case we will select Other account (POP3, IMAP)
windows mail 3

4. The Add an account window will open. Here, enter your email address, your name(as you want your receivers to see) and the password. Click Sign in button. You will get a message: All done! Your account was set up successfully! Click the Done button to close the window.
windows mail 4

5. Now, everything is set up. You can use the Mail software to send and receive email messages.
windows mail 5

If you prefer, check the video tutorial here:

Share this post:
Page 1 of 7
1 2 3 7