Use following command to copy-backup files from remote location to local location. {“/dev/“,”/proc/“,”/sys/“,”/tmp/“,”/run/“,”/mnt/“,”/media/*”,”/lost+found”}: This will exclude the files that we don’t need the backup for. root@111.2222.333.444/path/to/remote/folder/ : This is remote path. /backups/local/folder : This is local path.
Category: Command
Install and use Gearman
Queuing systems are complex in nature and developing them is equally a difficult task. Every programming language has to have some sort of queue system to perform certain tasks. So, here we are going to implement a queue system in PHP by using Gearman PECL Extension. Installing Gearman Use the following command to install Gearman package on the centos server.…
How to Install and use wkhtmltopdf on CentOS 8
In this article we will discuss about how to install wkhtmltopdf on centos 8 and simple examples to use it. Introduction Often we find ourselves in a position where we need quick pdf files for a document that is right now is on internet. There’s is no direct way to do it from browser unless you hit online tools that…
Youtube-dl commands
Youtube-dl is a pretty much goto solution for many users to download content from youtube, whether they want to backup their youtube channel content or want to download music youtube-dl covers all. Following are some widely used youtube-dl commands. Get youtube link information without downloading it The following command will get video link information (for example video title or duration)…
List subfolders in a directory with human-readable folder size
If you want to list subfolders in a directory with human-readable content size in them then you can use this command: Here –max-depth=1 indicates that we don’t want to parse the subdirectories of subdirectories that currently we are showing size for. The output will look like this: This answers the question: How to list subdirectories with size?
MYSQL: Syntax error or access violation: 1055
So upgraded mysql to new version and started seeing these warnings: PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘db.column_name’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible Method 1: We can fix it by…
Find out how much space is left on the centos server | Centos check disk space
Finding out about disk space usage on centos is very easy, we just need to run a simple command to do that. It will return all available disk partitions with how much they are occupied with files and how much they are empty both in bytes and percentage. The Command: Centos check disk space command
Find a ‘word’ in history of commands that you ran on ssh
If you want to search in history to search for a specific command that you ran while ago, use grep as it’s used in command below. Replace *keyword* with the word you want to search, just like i want to search for *restart*.
Fix phpMyAdmin – HTTP error 404
phpMyAdmin – HTTP error 404 appears when the server does not find the default phpMyAdmin folder. This can be fixed if you manually download phpMyAdmin or by running the following command on SSH. Wait for command to finish, then reload phpMyAdmin page that gave error to confirm its working again.