What is data security?
Data security is the set of practices that keep information confidential, accurate and available from the moment it is collected to the moment it is deleted.
How is data security different from network or server security?
It follows the data rather than the infrastructure. Network and server security protect the paths and machines; data security asks where each kind of information lives, who can read or change it, how it is protected wherever it goes, including backups, exports and test copies, and when it should be destroyed. A perfectly hardened server still leaks if a developer copies the customer table to a laptop for testing.
Why start with classification?
Because you cannot protect everything equally, and should not try. Group data by the harm its exposure would cause, then apply controls to match. A simple scheme with three or four levels works for most organisations:
| Level | Examples | Minimum controls |
|---|---|---|
| Public | Product pages, public docs | Integrity only |
| Internal | Internal wiki, non-sensitive metrics | Login required |
| Confidential | Customer records, contracts, source code | Least privilege, encryption, access logging |
| Restricted | Payment data, health data, credentials, private keys | Strict need-to-know, strong encryption, separate systems, audits |
How should access be controlled?
By least privilege and separation. Each person and service gets only the access its job requires, granted through roles rather than individual exceptions, and reviewed regularly. Applications should use database accounts limited to the tables they need; reporting uses read-only replicas; administrators use personal accounts with two-factor authentication rather than shared root logins. Our Identity and access management article covers the identity side in depth.
-- PostgreSQL: a reporting role that can read but never change orders CREATE ROLE reporting_ro NOLOGIN; GRANT USAGE ON SCHEMA sales TO reporting_ro; GRANT SELECT ON sales.orders, sales.order_lines TO reporting_ro; CREATE ROLE analyst_maria LOGIN PASSWORD 'set-a-long-one' IN ROLE reporting_ro CONNECTION LIMIT 3;
Where does encryption fit?
Everywhere data moves or rests outside the running system. Use TLS for every connection, WireGuard between servers, LUKS or ZFS encryption on disks, and client-side encryption for backups. For restricted data, consider field-level encryption in the application so even database administrators see only ciphertext. Our Encryption article explains the methods and key management.
Why log access to data?
To detect misuse and to reconstruct what happened. Record who accessed or changed sensitive records, from where and when, and send those logs to a separate server so they cannot be altered by someone covering their tracks. Database audit extensions such as pgAudit, application-level audit tables and web server logs together give a usable trail. Alert on unusual patterns, such as one account exporting far more records than usual.
How long should data be kept?
Only as long as there is a purpose or a legal requirement. Data protection laws such as the GDPR require personal data to be kept no longer than necessary, and every extra year of retention is another year of exposure. Set retention periods per data type, automate deletion, and remember backups: a deleted record lives on in every backup until those copies expire. Our Data loss prevention article covers stopping data from leaving where it should stay.
How is data securely deleted?
By destroying keys or overwriting media, depending on the storage. On SSDs, overwriting files is unreliable because of wear levelling; encrypting from the start and then destroying the key (crypto-erase) is the dependable method. NVMe drives also support a format with secure erase. When ending a server rental, wipe the disks before handing the machine back:
nvme format /dev/nvme0n1 --ses=1 blkdiscard -f /dev/nvme1n1 cryptsetup erase /dev/md2 # destroys all LUKS key slots
Which controls apply to data on rented servers?
Choose the location to fit your legal requirements, encrypt disks, encrypt all traffic between servers, keep backups on a second machine you control and document where each data type lives. Our twelve data centres include several inside the European Union, such as Gravelines, Frankfurt and Warsaw, for data that must stay there. The data centre controls physical access and replaces failed drives; you control everything else. Our IT security basics article covers the wider security programme.
How do test and development copies stay safe?
By not containing real personal data in the first place. Generate synthetic records, or mask production exports so names, addresses and payment details are replaced with realistic fakes before anyone copies them to a laptop or a staging server. Tools such as PostgreSQL Anonymizer apply masking rules inside the database. Where a real copy is unavoidable for debugging, treat the staging server exactly like production and delete the copy when the work ends.
Related pages
Encryption
Turning readable data into ciphertext only key holders can reverse: symmetric and public-key methods, data in transit and at rest, and key management.
Read moreData loss prevention
Data loss prevention for server owners: classify what matters, control where it can travel, watch outbound flows and stop accidental leaks before they happen.
Read moreIdentity and access management
Deciding who can do what: identities, authentication factors, authorisation models, single sign-on, life cycle and server access without shared root passwords.
Read moreIT security basics
The parts of IT security that matter for a team running servers: identity, patching, network exposure, data protection, logging and a practised response.
Read moreQuestions and answers
What is the first step in data security?
Knowing what data you hold and where, then classifying it by sensitivity so the strongest controls go where the risk is highest.
How do I limit who can read sensitive data?
Grant access through roles with least privilege, use separate read-only accounts for reporting, require two-factor authentication and review access regularly.
How do I securely delete data on SSDs?
Encrypt from the start and destroy the key, or use the drive secure erase function. Overwriting files is unreliable on flash storage.
Can I keep data inside the European Union?
Yes. Choose a data centre in an EU country, such as Gravelines, Frankfurt or Warsaw, and keep backups in an EU location as well.
Do backups need the same protection as live data?
Yes. Backups contain the same information, so they need encryption, access control and retention limits just like the original.