While I was talking to one of my Jrs today about backups, a .Net guy poked his head around the corner to offer his opinion on the matter. The subject was basically whether everything will be copied over if you do a full backup and restore it to another system.
Here’s basically how the talk went:
.NET – Well, it really depends on whether you have different filegroups as to whether everything will be restored.
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: Well, yeah, but I’m just saying that DBs can have a lot of filegroups sometimes and if it does, then you might not get all o fthem.
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: But…
DBA: There are no buts… if it’s a full backup and it restores, everything is there.
.NET: I’m just saying that…
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: You can’t deny that there are several filegroups, right?
DBA: I would never try to deny that.
.NET: And if you backup those different filegroups, then you can only restore some of them, therefore you can have a DB with some filegroups unrestored.
DBA: This is correct.
.NET: So back to my original…
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: No, because you just said that you can backup different filegroups and restore only part of them.
DBA: Yes I did.
.NET: So aren’t we saying the same thing?
DBA: No, not even close.
.NET: Why not?
DBA: Because we were talking about full backups, not filegroup backups. Full backups backup everything… it’s in the name. Filegroup backups only backup filegroups… that’s also in the name. But a full backup can only be restored fully. There is no partial restore of a full backup.
.NET: So you’re telling me that you backup the full DB and you can backup filegroups, but it’s a different kind of backup?
DBA: Yes.
.NET: But still, if you have…
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: You’re not letting me finish.
DBA: Yeah, because I know what you’re trying to say and there’s no wiggle-room.
.NET: But if you have multiple filegroups, then…
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: So are you telling me that there’s absolutely no way to restore only certain filegroups from a full backup?
DBA: That’s exaxtly what I’m telling you. Again, it’s in the name ‘Full Backup’.
.NET: So is there a way to change the location of a filegroup when you restore the full backup?
DBA: Only if it’s tied to a specific file and you restore that file to another location, then you’re really moving the file itself and the filegroup is coming along for the ride.
.NET: But I keep thinking there’s got to be a way to…
DBA: No, if it’s a full backup and it restores, everything is there.
.NET: But if there’s not enough disk space and it only restores part of the DB then that would leave you with only part of the DB.
DBA: No, it wouldn’t complete the restore and you’d have nothing.
.NET: So if you take a filegroup backup then you can restore different filegroups.
DBA: Yes.
.NET: Then I’m still right.
DBA: No, not even close.
.NET: Yeah, because you can still do what I said you could do.
DBA: No, because you’ll recall that there are 2 very important aspects of what I’m saying and they both have to be there… which is part of the original topic: “If it’s a full backup” and “if it restores”. If both of those exist, then you’ve got everything in the DB.
.NET: But I still think you should be able to…
DBA: No, if it’s a full backup and it restores, everything is there.
And then it just kind of tapered off into other backup discussions from there, but that was just fun.
Thought you guys might like a funny story on a mon.