If you cannot trust the location your machine is placed in, you can never consider your data as fully save.
A common setup to minimize the risk of data loss is to encrypt disk partitions / logical volumes that contain sensitive data. This protects you from
- someone removing the harddrive, placing it into another machine and reading the data
- someone rebooting your machine into a different system and accessing your data from there.
However, during runtime your system will have to know how to decrypt the data when someone with authorization wants to read it. Hence, after (re)boot you will have to enter the passphrase used to encrypt the data, after that the private key for de/encryption will be kept in memory. Hence, encryption
- does not enhance security against attackers abusing weaknesses in your software (svn server, webserver, etc) or system (anyone who can gain root permissions on your system can access your data and also make a copy of your private key in memory)
- does not protect you against more sophisticated measures to get access to your data. For instance, RAM does not instantly lose all the data when computer is turned off or the power is cut. It has been proven that one can delay that process by cooling down the ram to gain enough time to read the RAM (and hence gain access to encrypted data when one has physical access to the machine).
However, one has to evaluate how realistic such a scenario is. As I said, if you mistrust the location / people handling your hardware, you are always at risk. If the hardware itself is even provided by that people (rented hardware in a datacenter) there is even the additional risk that your hardware has been modified to gain access to your data - for instance the personal has access to your RAM state even without turning of your computer and deep freezing the RAM.
If you want want to increase your data security level and can live with the disks of the scenarios sketched out above you probably want to use disk encryption. Its a popular thing to do with data placed in a data center. To realize this on your linux system you want to look into
- dmcrypt - a cryptography kernel module that ships with every modern linux and in particular
- LUKS - an easy way to use it.