In this article, I show how I set up a recently purchased USB external hard disk drive as a backup drive for my Linux desktop PC. I'll delete the default FAT32 partition, create a new partition, make a reiserfs filesystem, and show how to use rsync to backup your important data.
1. Partition the disk
I prefer reiserfs (Reiser 3). I know I'll never need to backup a Windows machine since I don't do Windows, so putting up with the inadequacies of FAT32 is simply not required. You may wish to rethink which fileystem to go for, or perhaps a different partitioning strategy if you have a seperate Windows PC. I'm going to go for a single large Reiser 3 partition. To do this, I first need to use cfdisk to delete the old partition and create a new one. You will probably need root access or sudo for this, depending on how your system is configured.
# cfdisk /dev/sdb
a. A FAT32 partition. Let's get rid of it and then see what we have left. Select [ Delete ] from the menu.
b. Right, nothing left. Time to create a new partition. This will be a primary partition, and I'll only make one - this whole disk is for backups. Select [ New ], [Primary] to create a new primary partition. Accept the default size offered, which should be all the disk space available.
c. Now write the new partition table to disk.
d. Type yes and enter to continue
e. You should now be able to [ Quit ].
So to recap, I've created a single primary Linux partition, using all the available disk space on my USB drive.
2. Creating a new filesystem
1. Now to create our filesystem of choice. I'll be using reiserfs, you can choose ext3 or whichever you want.
# /sbin/mkreiserfs /dev/sdb1
3. Running the backup
The command I now use for backing up my department directory in /dept partition
# cd /media/usbdisk/
# mkdir department
# cd /root/
# rsync -vrlptg /dept/department /media/usbdisk/department
4. Running the restore
# rsync -vrlptg /media/usbdisk/department /dept/department
Thursday, July 30, 2009
Singapore: Press Freedom and Human Rights?
Since Singapore's independence (Independence from Malaysia? or British?) the Peoples Action Party (PAP)(not DAP) under the reign of Mr. Lee Kuan Yew has won every election so far, it is quite sure that they will win on every election. They announced to run for a clean sweep: they want to will all of the 84 seats in parliament (they held 82 before). Around election time, it is not uncommon, that opposition politicians face libel suits (that would both deprive them from funds and the right to stand in an election).
The mainstream press has been accused to biased in favour of the government, (political) video and podcasting has been banned during elections, hot election topics become part of a law suite (so it becomes an offence to blame anybody) and senior politicians threaten voters that the executive (which should be apolitical by definition) would neglect them once they vote for the opposition. Also the opposition is not very strong in numbers, they can't field a team to contest all 84 seats. No wonder that besides a low record on press freedom, Singapore doesn't score well on the Asia Democracy Index either. Nevertheless, it seems this election seems to get a little more interesting than before:
First of all, for the first time since 1988 the opposition fields enough candidates to contest more than half of the seats, so the PAP didn't return to power on nomination day (which is only a few days before the elections to shorten the campaign time, which otherwise could dent Singapore's productivity). The opposition dares to contest the electorate run by the prime minister The team is young and unknown, so any vote for them rather counts as a vote of no confidence for the incumbent prime minister Lee Hsien Long (son of Lee Kuan Yew --- anybody thinking it could be this, better gets ready for a libel suit). But the most surprising fact, since very little is found in our local press: the opposition seems to enjoy quite some support . The new Public Order Act (POA) gives power to the police to tell even one person to move on because he has now been defined as an assembly. It is explained that this POA is to prevent destabilising street protests seen in Thailand and terrorist attacks such as Mumbai.
Internet Filtering In Singapore: Case Study
I'm wondering on how Singapore government control on press coverage and internet access in direct or indirectly. Based on the researched by University of Toronto, Harvard Lawschool and the University of Cambridge who jointly run the OpenNet Initiative. From their objective: "The ONI mission is to investigate and challenge state filtration and surveillance practices. Our approach applies methodological rigor to the study of filtration and surveillance blending empirical case studies with sophisticated means for technical verification. Our aim is to generate a credible picture of these practices at a national, regional and corporate level, and to excavate their impact on state sovereignty, security, human rights, international law, and global governance." Their latest research paper sheds a light on Internet filtering in Singapore. In a nutshell: filtering does barely happen on a technical level but mostly in the heads of people. There are some compelling reasons for this "scissors in the head", but read for yourself.
The mainstream press has been accused to biased in favour of the government, (political) video and podcasting has been banned during elections, hot election topics become part of a law suite (so it becomes an offence to blame anybody) and senior politicians threaten voters that the executive (which should be apolitical by definition) would neglect them once they vote for the opposition. Also the opposition is not very strong in numbers, they can't field a team to contest all 84 seats. No wonder that besides a low record on press freedom, Singapore doesn't score well on the Asia Democracy Index either. Nevertheless, it seems this election seems to get a little more interesting than before:
First of all, for the first time since 1988 the opposition fields enough candidates to contest more than half of the seats, so the PAP didn't return to power on nomination day (which is only a few days before the elections to shorten the campaign time, which otherwise could dent Singapore's productivity). The opposition dares to contest the electorate run by the prime minister The team is young and unknown, so any vote for them rather counts as a vote of no confidence for the incumbent prime minister Lee Hsien Long (son of Lee Kuan Yew --- anybody thinking it could be this, better gets ready for a libel suit). But the most surprising fact, since very little is found in our local press: the opposition seems to enjoy quite some support . The new Public Order Act (POA) gives power to the police to tell even one person to move on because he has now been defined as an assembly. It is explained that this POA is to prevent destabilising street protests seen in Thailand and terrorist attacks such as Mumbai.
Internet Filtering In Singapore: Case Study
I'm wondering on how Singapore government control on press coverage and internet access in direct or indirectly. Based on the researched by University of Toronto, Harvard Lawschool and the University of Cambridge who jointly run the OpenNet Initiative. From their objective: "The ONI mission is to investigate and challenge state filtration and surveillance practices. Our approach applies methodological rigor to the study of filtration and surveillance blending empirical case studies with sophisticated means for technical verification. Our aim is to generate a credible picture of these practices at a national, regional and corporate level, and to excavate their impact on state sovereignty, security, human rights, international law, and global governance." Their latest research paper sheds a light on Internet filtering in Singapore. In a nutshell: filtering does barely happen on a technical level but mostly in the heads of people. There are some compelling reasons for this "scissors in the head", but read for yourself.
Wednesday, July 29, 2009
Follow the Leader - Put Linux on your server!
According to Microsoft's Steve Ballmer: "Forty percent of servers run Windows, 60 percent run Linux" (I presume he is talking about the x86 based servers, not the whole server market). So sticking to the popular strategy " Follow the leader" it is time to kick out that Windows servers. Of course together with IIS, since that is trailing Apache HTTP for quite some time now. While you are on it, check out IBM's Open Client and get your desktop some Suse, Redhat or Ubuntu.
Who uses Lotus Notes and Domino
In case you missed it. Volker is sick of the various claims on market share Exchange/Outlooks vs. Notes/Domino. So he took matters in his own hands and created a Wiki page to harness collective knowledge to answer that question. Of course it is an apple vs. [fill-in-your-favorite-fruit] comparison and the list already shows that there are quite a number of shops that run both and/or run Exchange for messaging and have Notes applications. I still believe that Exchange is the accepted collateral damage for a decision to use Outlook for eMail, but I'm openly biased of course. I guess it is a question of time until someone adds pages to that wiki for government agencies or companies in general (can that wiki autosort a list?).Go check it out yourself. The invite key you need is "that is the question "
How to setup Relay host in mail server to Relay to TMNET SMTP Server
Since for a long duration time, tmnet already blocked all the connection to smtp port 25 for all the dynamic ip address users. This is due to the most of TMNET IP address was detected as a blacklisted IP Address in the most of realtime database server of IP addresses of verified spam sources and spam operations. (most in the world).
Alternatively, i would configure my postfix services in linux to relay my mail to tmnet SMTP Server.
These instructions i assumed the postfix config files live in /etc/postfix.
1. In /etc/postfix/main.cf add the lines: relayhost = smtp-proxy.tm.net.my:25 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_sasl_security_options=
2. Optionally, also add the lines:
smtp_use_tls = yes smtp_tls_CAfile = /etc/postfix/cert.pem smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
to enable SSL/TLS when sending outgoing mail. Note that the path info in the second command may be different depending on your system and where you have installed your certificates. The last line may be omitted, but should help reduce CPU cycles verifying the certificate chain when sending outgoing E-Mail.
3. Create a file /etc/postfix/sasl_passwd with the contents: smtp-proxy.tm.net.my userid:password
where userid and password are your domain username and password.Next, change the ownership and permissions on the sasl_passwd file to protect it from unauthorized access. chown root:root /etc/postfix/sasl_passwd chmod 600 /etc/postfix/sasl_passwd
4. Finally, create a database file from the contents of the sasl_passwd file
:postmap hash:/etc/postfix/sasl_passwd
OPTIONAL: If you wish to relay only specific domains via smtp-proxy, You will need to do the following:Remove the relayhost = smtp-proxy.tm.net.my entry in main.cf, if one exists.
5. Add the following line to your main.cf file:
transport_maps = hash:/etc/postfix/transport
6. Edit /etc/postfix/transport and update it with something similar to the following:
# Syntax: .domain transport:relay_host # Specifies specific domains for local delivery my.domain.com : # Specify all subdomains for local delivery .my.domain :
# Specify domains that need to be relayed through smtp-proxy.tm.net.my aol.com relay:smtp-proxy.tm.net.my hotmail.com relay:smtp-proxy.tm.net.my
7. Create a database file from the contents of the transport file:
postmap hash:/etc/postfix/transport
8. Lastly, reload postfix: postfix reload
If you want to change the port that Postfix uses to send outgoing mail we need to change the definition of the SMTP port in /etc/services. i do not have comprehensive instructions for making this change, but some reasonable searching should get you the information you need - when changing /etc/services, though, you should be very careful, as this file controls a large part of the UNIX system's TCP/IP interactions
P/S: I still can flood others SMTP Server (Organization Internet Mail Server) by relaying to tmnet SMTP Server ....heheheh...
Alternatively, i would configure my postfix services in linux to relay my mail to tmnet SMTP Server.
These instructions i assumed the postfix config files live in /etc/postfix.
1. In /etc/postfix/main.cf add the lines: relayhost = smtp-proxy.tm.net.my:25 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_sasl_security_options=
2. Optionally, also add the lines:
smtp_use_tls = yes smtp_tls_CAfile = /etc/postfix/cert.pem smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
to enable SSL/TLS when sending outgoing mail. Note that the path info in the second command may be different depending on your system and where you have installed your certificates. The last line may be omitted, but should help reduce CPU cycles verifying the certificate chain when sending outgoing E-Mail.
3. Create a file /etc/postfix/sasl_passwd with the contents: smtp-proxy.tm.net.my userid:password
where userid and password are your domain username and password.Next, change the ownership and permissions on the sasl_passwd file to protect it from unauthorized access. chown root:root /etc/postfix/sasl_passwd chmod 600 /etc/postfix/sasl_passwd
4. Finally, create a database file from the contents of the sasl_passwd file
:postmap hash:/etc/postfix/sasl_passwd
OPTIONAL: If you wish to relay only specific domains via smtp-proxy, You will need to do the following:Remove the relayhost = smtp-proxy.tm.net.my entry in main.cf, if one exists.
5. Add the following line to your main.cf file:
transport_maps = hash:/etc/postfix/transport
6. Edit /etc/postfix/transport and update it with something similar to the following:
# Syntax: .domain transport:relay_host # Specifies specific domains for local delivery my.domain.com : # Specify all subdomains for local delivery .my.domain :
# Specify domains that need to be relayed through smtp-proxy.tm.net.my aol.com relay:smtp-proxy.tm.net.my hotmail.com relay:smtp-proxy.tm.net.my
7. Create a database file from the contents of the transport file:
postmap hash:/etc/postfix/transport
8. Lastly, reload postfix: postfix reload
If you want to change the port that Postfix uses to send outgoing mail we need to change the definition of the SMTP port in /etc/services. i do not have comprehensive instructions for making this change, but some reasonable searching should get you the information you need - when changing /etc/services, though, you should be very careful, as this file controls a large part of the UNIX system's TCP/IP interactions
P/S: I still can flood others SMTP Server (Organization Internet Mail Server) by relaying to tmnet SMTP Server ....heheheh...
Subscribe to:
Posts (Atom)