After making a big batch of cold brew, I'd like to be able to keep it around for an extended period of time-- one month, let's say. Assuming I keep it in an airtight container in the refrigerator, how long will my batch of cold brew remain fresh, flavorful and bacteria-free?
From anecdotal experience freshness and flavor begins to fade within ~7 days with regular storage methods. Many people brewing cold brew online state between 5 days and 2 weeks is okay to keep cold brew for. In my opinion you will have coffee that you won't want to drink long before you run into harmful bacteria as long as you are keeping things sanitary.
How you store the coffee will determine how long it keeps. To improve storage look into bottling it in individual bottles with little headspace, or even kegging the coffee. Exposing coffee to oxygen will negatively impact flavor and expose coffee to more bacteria. Creating a concentrate of the coffee may help to prevent bacteria from forming. Splitting batches up into multiple sterile containers and keeping them sealed may also help it to last longer.
Getting your coffee to last you a full month is almost definitely going to be much more of a hassle than brewing coffee more frequently. The taste will always be better from fresher coffee and cold brewing coffee is one of the simplest methods. Unless you absolutely can't make coffee more frequently I would recommend making smaller batches you can consume quickly.
As annoying as it is, I would say venture to say that making a month's supply of cold brew is not a great idea. Normal cold brew will begin to lose its flavor after a week, if you're lucky a week and a half.
I would try to either make smaller amounts that you can consume in a week or less. If you're making it traditionally, this shouldn't be a huge amount since you'd be diluting the brew upon drinking it with water.