Wednesday, April 6, 2016

අපේ ඇස්වලට පෙනි පෙනී අපි නොදකින Gmail Inbox එකේ TAB වල ඇති සියලුම Email එකවර Delete කිරීම


දැන් Google සමාගම විසින් Gmail Inbox එක modify කරලයි තියෙන්නෙ ඒකෙ Primary, Social, Promotions, updates කියලා tabs වගයක් තියෙනවා‍. මට තිබුන ලොකුම අවුල තමයි මේ Social කියන TAB එක Facebook එකෙන්  එන email notifications වලින් පිරිලා තැබුනා. නමුත් මේවා එකෙන් එක Delete කරන එකනම් සෑහෙන වදයක් ඒකට පොඩි විසදුමක් තමයි අද මම කියන්න යන්නෙ.

ඒත් මේ කියන්න යන්නේ අමුතු දෙයක් ගැන නම් නෙවෙයි.  හැමෝටම පේන්න තියෙන ඒත් අවධානය යොමු නොවුණු පුංචි තැනක් ගැනයි. Gmail Inbox එකේ TAB වල ඇති සියලුම Email එකවර Select කිරීමේ ක්‍රමයක් බොහෝදෙනෙක් දැක නැතත් Inbox එකේම උඩින්ම තිබෙනවා. මේ සඳහා ඔබ කළයුත්තේ ඔබේ ඉන්බොක්ස් එකෙහි සාමාන්‍ය පරිදි පළමු පිටුවේ ඇති Emails සියල්ල සිලෙක්ට් කිරීම පමණයි. ඒ සඳහා ඔබට Select All විකල්පය තෝරාදිය හැකියි.



ඉන්පසු ඔබේ Inbox එකට අදාල Social කියන TAB  එකේ පළමු පිටුවේ ඇති ඊමේල් සියල්ල select කල හැක. එමෙන්ම එම Email සංඛ්‍යාව select වී ඇති බවත්, Social කියන TAB  එකේ ඇති සියලුම Email select කළහැකි විකල්පයකුත් එම Emails වලට ඉහළින් පෙනෙනු ඇති. 
පහත රූපයේ පරිදි රතු ඊතලයෙන් Social කියන TAB  එකේ අැති එදා මෙදා තුර පැමිණි  සියලුම Emails දිස්වේ.

දැන් ඔබ කළයුත්තේ මෙම Select all 489  conversations in Social යන්න මත ක්ලික් කිරීමයි. එවිට ඔබේ Social කියන TAB  එක තුළ එදා මෙදා තුර පැමිණි සියලුම Emails select වනු ඇත. දැන් ඔබට Delete මත ක්ලික් කර එම ඊමේල් සියල්ල එකවර මකා දැමිය හැකියි හැකියි.


ඉන්පසු ඔබේ Social කියන TAB එක clear වනු ඇති.

මේ අපි බොහෝදෙනෙකුගේ ඇස්වලට පෙනි පෙනී අපි නොදකින තවත් එක් දෙයක් විතරයි. තවත් මෙවැනි දේ ඇති. සොයා බලන්න.



Read More »

Thursday, February 11, 2016

Main ways to Backup and Restore MariaDB


There are two types of backups called 

1. Logical backups
2. Physical backups

1. Logical backups

Logical backups consist of the SQL statements necessary to restore the data, such as CREATE DATABASE, CREATE TABLE andINSERT.

2. Physical backups

Physical backups are performed by copying the individual data files or directories.

Logical vs Physical backups
The main differences are as follows:
  • logical backups are more flexible, as the data can be restored on other hardware configurations, MariaDB versions or even on another DBMS, while physical backups cannot be imported on significantly different hardware, a different DBMS, or potentially even a different MariaDB version.
  • logical backups can be performed at the level of database and table, while physical databases are the level of directories and files. In the MyISAM storage engine, each table has an equivalent set of files, while in the InnoDBstorage engine, by default, a number of tables are stored in the same file, in which case it is not possible to backup by table.
  • logical backups are larger in size than the equivalent physical backup.
  • logical backups takes more time to both backup and restore than the equivalent physical backup.
  • log files and configuration files are not part of a logical backup

Backup tools

mysqldump

mysqldump performs a logical backup. It is the most flexible way to perform a backup and restore, and a good choice when the data size is relatively small.
For large datasets, the backup file can be large, and the restore time lengthy.
mysqldump dumps the data into SQL format (it can also dump into other formats, such as CSV or XML) which can then easily be imported into another database. The data can be imported into other versions of MariaDB, MySQL, or even another DBMS entirely, assuming there are no version or DBMS-specific statements in the dump.

Examples

A common use of mysqldump is for making a backup of an entire database:
shell> mysqldump db_name > backup-file.sql
You can load the dump file back into the server like this:
shell> mysql db_name < backup-file.sql
Or like this:
shell> mysql -e "source /path-to-backup/backup-file.sql" db_name
mysqldump is also very useful for populating databases by copying data from one MariaDB server to another:
shell> mysqldump --opt db_name | mysql --host=remote_host -C db_name
It is possible to dump several databases with one command:
shell> mysqldump --databases db_name1 [db_name2 ...] > my_databases.sql
To dump all databases, use the --all-databases option:
shell> mysqldump --all-databases > all_databases.sql
For InnoDB tables, mysqldump provides a way of making an online backup:
shell> mysqldump --all-databases --single-transaction all_databases.sql

Read More »

Tuesday, November 17, 2015

IP address වර්ග


ඔන්න අද කතා කරන්න  යන්නේ IP address ගැන තවත් වැදගත් දේවල් ටිකක් තමයි.
IP address වර්ග දෙකක් මේ වෙනකොට ලෝකේ පාවිච්චි කරනව. ඒ තමයි, 

1.   IP VIRSION 4 (ipv4)
2.   IP VERSION 6 (ipv6)

දැනට අපිනම් වැඩිපුරම භාවිතා කරන්නේ ipv4 address තමයි. ඒත් ලෝකේ අනිත් රටවල් නම් ipv6  address දැන‍ට පාවිච්චි කරනවා.
අපි වැඩියෙන්ම පාවිච්චි කරන  IPv4 ගැන දැන් කතාකරමු…

Ø IP address එකක byte 4ක් තියෙනවා.
Ø එක byte හදුන්වන්නේ octet එකක් කියලයි.  
Ø Octet එකක උපරිම අගය 255 සහ අවම අගය 0 වේ.
Ø එම අගය 8බිට් (8 bit) වලින් පෙන්න්වයි.
Ø Ip addressඑකට bit 32තියෙනවා.

අපි සාමාන්‍යයෙන් IP address එකක් ලියන්නේ  Dot-decimal notation එකෙන්. 
දැන් ඔයාලා බලනවා ඇති මොකක්ද මේ Dot-decimal notation කියන්නේ කියලා.
ඒ කියන්නේ  අපි ඉස්සර වෙලා කතාකරපු Octet එකක් එහෙමත් නැත්නම්  byte 1ක්  
( bit වලින් නම් 8ක් ), dot 1 කින් වෙන් කරලා දහයේ පාදයෙන් ලියන ක්‍ර‍ම වේදයට තමයි.

උදාහරනයක් ලෙස  මෙ‍ම 172.16.254.1. IP address එක සලකා බැලුවොත් මෙහි  ඇති IP එක dots වලින්  8 bits (octet) group වලට වෙන් කරලා තියෙනවා.













සාමාන්‍යයෙන්  ip address එකක් හරි විදිහට නම් භාවිතා කරන්නේ ඕනේ binary අගයන් වලින්   ( උදා: 11000000.10101000.00000101.10000011 ).

මේ ක්‍රමය අපිට මතක තියාගන්න අපහසු නිසා තමයි ඒක දහයේ පාදයේ සංඛ්‍යා වලට 
හරවල මේ  ip address පාවිච්චි කරන්නෙ. ඉහත උදාහරණයේ binary වලින්දක්වා ඇති  
ip address එක  දහයේ පාදයට හරවපුවම ලැබෙන්නේ 192.168.5.131.


ඉතින් මේ ක්‍රමයට කොච්චර address ප්‍රමාණයක් හදන්න පුලුවන්ද කියල ඔයාලට අමුතුවෙන් කියන්න ඕන නෑනේ. 

000.000.000.000 ඉදල  255.255.255.255 වෙනකන් address  බිලියන 4.3 ක් විතර හදන්න පුළුවන්. කොහොම උනත් මේ ලිපින වලින් මිලියන 16.8 ක් විතර නොයෙක් හේතුන් මත සාමාන්‍ය පරිශීලකයන්ට භාවිතා කරන්න දෙන්නෙ නෑ. 
අපි ඒ ගැනත් ඉදිරියේදි කථාකරමුකෝ. (  public IP address සහ private IP addresses ලෙස අා‍යෙත් ip address බෙදා දක්වන්න පුලුවන් )

ඒ උනාට මේ address බිලියන ගණන අද වන විට මදි වෙලා කියල කිව්වොත් ඔබ විස්වාස කරන එකක් නෑ. ඒ තරමට අන්තර්ජාලය හා සම්බන්ද වෙන උපාංග ගණන අති විශාල ලෙස ඉහල ගිහින්. ඉතින් මේකට පිලියමක් වශයෙන් තමයි ipv6 ලෝකයට එන්නෙ.





Read More »