10 Ways I Avoid Trouble in the Database
1. Avoid destructive commands
From
time to time I’m working with new recruits and bringing them up to
speed in operations. The first thing I emphasize is care with
destructive commands.
What do I mean here? Well there are all
sorts of them. SQL commands such as DROP table & DROP database.
But also TRUNCATE and DELETE are all destructive. They’re easy to
execute but harder to undo. Think of all the steps it would take to
restore from your backup.
If you are logged in as root there are
many many ways to shoot your own foot. I hope you know this right? rm
has lots of options that can be very difficult to step back from like -r
(recursive) and -f (force). Better to not use the command at all and
just move the file or directory you’re...