Monitor MySQL database restore progress with pv Rumi, January 12, 2013 The pv command is one that I really enjoy using but it's also one that I often forget about. You can't get a much more concise definition of what pv does than this one: pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. The usage certainly isn't complicated: To use it, insert it in a pipeline between two processes, with the appropriate options. Its standard input will be passed through to its standard output and progress will be shown on standard error. A great application of pv is when you're restoring large amounts of data into MySQL, especially if you're restoring data under duress due to an accidentally-dropped table or database. (Who hasn't been there before?) The standard way of restoring data is something we're all familiar with: # mysql my_database < database_backup.sql The downside of this method is that you have no idea how quickly your restore is working or when it might be done. You could always open another terminal to monitor the tables and databases as they're created, but that can be hard to follow. Toss in pv and that problem is solved: # pv database_backup.sql | mysql my_database 96.8MB 0:00:17 [5.51MB/s] [==> ] 11% ETA 0:02:10 When it comes to MySQL, your restore rate is going to be different based on some different factors, so the ETA might not be entirely accurate. Src: http://rackerhacker.com/2010/11/24/monitor-mysql-restore-progress-with-pv/ Related Administrations Configurations (Linux) MySQLPVTool
Varnish Nagios Plugin September 24, 2013 Install To use this plugin you need to have varnishstat installed which is installed by default when you install varnish. Perl is also required for this plugin. If you don’t have Perl installed you can install in by running the command below sudo apt-get install perl or sudo yum install… Read More
Build NFS Server on CentOS 7 March 9, 2018 As the first step, we will install these packages on the CentOS server with yum: yum install nfs-utils Now create the directory that will be shared by NFS: mkdir /var/nfsshare Change the permissions of the folder as follows: chmod -R 755 /var/nfsshare chown nfsnobody:nfsnobody /var/nfsshare We use /var/nfsshare as shared folder, if we… Read More
Reset Vesta CP (vestacp) admin password December 31, 2018 Method 1 Login to your server via SSH. Enter the below command to change the password. $ v-change-user-password admin newpassword Replace the newpassword field with the new password you want to set. Method 2 Login to your server via SSH. Enter command following command. $ passwd admin Enter new UNIX… Read More