Validating Backups: PGSQL Phriday #002

PostgreSQL
It's time again for the another PGSQL Phriday, this time, the question has been asked: How do you do PostgreSQL backups? Honesty up front. I'm very much just beginning my journey of learning PostgreSQL. I've been documenting that learning over here at Simple-Talk (more on the way there), including backups. For this post, I'm not going to tell you about my "experience" maintaining a PostgreSQL backup routine because, well, there isn't any. Instead, I have something else to say about backups that I learned, the hard way I might add, while working in SQL Server, that is 100% applicable to PostgreSQL. Backups Do Not Matter You heard me. In a post that's supposed to be about how you do backups, I'm telling you backups don't matter, and yeah, I'm serious.…
Read More

AWS RDS Backups

AWS, PostgreSQL, RDS
One of the things I love the most about Platform as a Service when it comes to data is the fact that you get RDS backups, built in. Go to the forums. Evidently, backups are one, or more, of the following:a) insanely difficult, so no one does themb) not considered important so no one does themc) not necessary in modern systems because of X technology so no one does them Then, someone deletes a row the business wants back. Someone drops a table. Someone drops a database. Then you find that one, or more, of the following is true:a) no one has ever tried to restore from X technology and you can'tb) come to find out, X technology doesn't really do backupsc) backups are still fundamental to protecting data Enter,…
Read More

Query Store and Log Backups

T-SQL
A question that came up recently around Query Store is what happens when there are log backups in use on the database. Let's talk about it. Query Store and Log Backups The core of the answer is very simple. Query Store, like any other data written to a database, whether a system table or a user table, is a logged operation. So, when you backup the database, you're backing up Query Store data. When you backup the logs, you're also backing up Query Store data. A point in time will include all the data written to the Query Store at that point. However, that's the kicker. At what point was the Query Store information written to disk? By default, there's a fifteen minute cycle before the Query Store moves the…
Read More

The Three T’s of Backups

T-SQL
I just read several more horror stories that include, among other things, failed backups. I've said it before (at volume, extreme volume), and evidently I have to say it again. Simply creating a backup file is not enough to ensure the protection of your information. In order to attempt to reinforce the importance of this idea, I'm going to introduce a new concept. Maybe it'll help. I'm calling it "The Three T's of Backups." Take 'Em First, and most important, you have to Take backups. That's your first "T". No, disk redundancy through RAID or a SAN or some other setup is not adequate to protect your information. You must take backups. They have to be created and they have to be run regularly. You absolutely should automate this. Test…
Read More

MySQL and Backups As A Service

Azure
With today's announcement that MySQL is available as a Platform as a Service (PaaS) offering through Azure, a lot more exciting opportunities have presented themselves for companies to build and manage their information. According to the DB-Engines Ranking, MySQL is the second most popular data management system out there. At last, you get to incorporate it directly into your Azure eco-system. While there are tons of reasons this is exciting, I'm going to focus on one very particular issue, backups. Why Are Backups Important? I'm not going to answer that question. Everyone knows that backups are important. Everyone knows that they need to have backups. Yet... There is example after example where people either haven't bothered to set up backups or didn't know what a real backup entails, or even…
Read More

SQL Server Backups Are A Business Decision

SQL Server, SQL Server 2016
Blog post #3 in support of Tim Ford’s (b|t) #iwanttohelp, #entrylevel Read more about Tim's challenge here. It's very easy to think of SQL Server backups as a technical problem. You have so much stuff going on, BACKUP DATABASE commands, recovery models, BACKUP LOG commands, Differential backups. Getting them all into the correct order and automating the processes sure seems like a technical problem. It isn't. It's all about the business. If you're taking on the duties of a DBA whether you're an accidental DBA, a reluctant DBA or you were voluntold into the DBA position, you need to plan to sit down with responsible parties from the business and get an understanding with them regarding RPO and RTO. RPO is a TLA for Recovery Point Objective. The easiest way to…
Read More

The Importance of a Full Backup in SQL Server

Database Lifecycle Management, DevOps, Professional Development, SQL Server, SQL Server 2016
This is the first of 12 posts this year in support of Tim Ford's #iwanttohelp initiative. These will be completely 100 level, introductory blog posts meant to help people that are just getting started as data professionals. I'll try to cover several different topics over the year, but felt I should start with what I think is the most important, backups. It is impossible to overstate the importance of getting a good backup of your SQL Server databases. A backup is the most fundamental of protections for the information on which your business is dependent. Since SQL Server is a service, it manages it's own files. Because of this, you can't just copy the *.mdb file where your data is stored. Instead, you must run a process, usually through the…
Read More

How Do You Know You’re Good At Your Job?

Professional Development
You've been working as a DBA for X number of years. How do you know you're good at it? Heck, you've been doing any sort of job for a while. How can you measure whether or not you're competent? The single best measure isn't how much work you do, your accomplishments, the number of databases designed, whatever measure you have. That's not it. The real measure, the one that counts, how do you perform when everything goes south? When that server goes offline or that database develops corruption or that SSIS package fails or, heck, you get a request to fix something that's broken, even non-technical stuff like an incorrect W-2 form (fighting this battle currently)? Did you run around like your hair was on fire? Did you sit there…
Read More

Database Backups: Things You Need To Do Now

SQL Server, T-SQL
I want to say a few things about database backups that you need to know. Wait a minute, haven’t you written about backups before? Why, yes. Yes I have. Aaand… you’re doing it again because? Have you noticed the shocking number of questions that come up on SQL Server Central and #sqlhelp regarding backups? Have you noticed the incredibly huge number of people who don’t have backups at all? That’s why. To get the word out. Oh, good point. Carry on. Because backups are so easy, people tend to discount them. That is, until they need them. Then, suddenly, they become extremely important. Here’s a suggestion: Make databases important now. Learn how SQL Server backup works. Make sure you have backups on your systems. Make sure you have the appropriate…
Read More

DBA 101: Why is my log file full?

SQL Server
This question comes up constantly in different venues. I see it sometimes 2-3 times a day on SQL Server Central. I know it pops up at least once a week on Ask SSC. I’m sure I’ve seen it on Twitter #sqlhelp. “Why is my log file growing?” and “Why is my log file full” are heard regularly. Or, the variation, “I ran a full backup but the log file is still full/growing.” occasionally comes up. The people asking these questions are frequently, even appropriately, frantic. I’m writing this blog post for two reasons. First, to try to add a little bit of weight to what must surely be one of the most searched for phrases on the internet when it comes to SQL Server. Second, just to have a shorthand…
Read More