Time sync with NTP server

Check for NTP server that is referenced currently

root@seeds-gateway:~# ntpq -p
remote refid st t when poll reach delay offset jitter
===========================================================
pool.ntp.org .INIT. 16 u - 1024 0 0.000 0.000 0.000

Compare current date on local machine vs NTP server

root~# rdate -n -p pool.ntp.org
Mon Jun 16 18:44:46 UTC 2014
root~# date
Mon Jun 16 18:25:03 UTC 2014

Update local machine Time (remove “-p” from rdate command)

root~# rdate -n pool.ntp.org
Mon Jun 16 18:45:35 UTC 2014
root~# date
Mon Jun 16 18:45:37 UTC 2014

MySQL | Backup and restoration using mysqldump

The mysqldump client is a utility that dumps one or more MySQL database for backup or transfer to another SQL server. It can be used to dump one table at a time as well. All that is required is connectivity to the database server and access privileges to the database.

Backup a single table.

mysqldump -u username -p db_name table_name > table_name_dump.sql

Backup multiple tables.

mysqldump -u username -p db_name table1_name table2_name > dump.sql

Restore the single table back to the database.

mysql -u username -p db_name < /path/to/table_name_dump.sql

Backup an entire database. The command can be altered to backup multiple databases just like tables.

mysqldump -u username -p db_name > db_backup.sql

Backup all the databases in the server.

mysqldump -u username -p --all-databases > all_db_backup.sql

Restore the database.

mysqldump -u username -p < db_backup.sql