Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 782
  • Last Modified:

Thousands of transaction logs

Hello, we are running exchange 2010. The database hasn't been backed up by any exchange aware applications and therefore the transaction logs haven't been purged out. Now we have thousands of transaction logs which is making our first exchange aware backup take forever. I've ready about people withe the same issues and their backups took weeks because of all the transaction logs. My question is, could I move most of my logs to another location and then run my backup? Are there any problems with doing this? I can't have the initial backup take weeks.
0
StarfishTech
Asked:
StarfishTech
  • 7
  • 6
  • 4
  • +2
4 Solutions
 
endital1097Commented:
you have a couple of options
1, dismount the database, run eseutil /mh to determine logs required, manually delete any log older than reported
2. enable circular logging to purge logs then disable
0
 
StarfishTechAuthor Commented:
Do I have to dismount the database to run eseutil? I'm just worried that if I dismount the database, it won't remount.
0
 
Andre ThibodeauITCommented:
Yes you do.

Like endital mentioned above, dismount the database, run "eseutil /mh databasename.edb", if you see 'Clean Shutdown' and you probably will, then all logs have been committed to the database.  You can then delete (move) all of the log files.  If you have multiple databases located in the same directory structure take care in the log file names and which ones you are deleting.

Unless you have other issues on the go, re-mounting a database with a clean shutdown should not cause you any issues.

If for some reason you have a dirty shutdown, you can preform a Soft Recovery, note the recovery is from the first log file (ie:EOA) you can see this in the read out from the eseutil /mh command, see eseutil docs for more details.   Log files for each storage group are distinguished by file names with numbered prefixes (for example, E00, E01, etc). Log files are numbered in a hexadecimal manner, but reported in the eseutil in decimal format. You can convert log file sequence numbers to their decimal values by using the Windows Calculator (Calc.exe) application in Scientific mode.  To view the decimal sequence number for a specific log file, you can examine its header by using the Exchange Server Database Utilities (Eseutil.exe) tool. The first 4k page of each log file contains header information that describes and identifies the log file and the databases it belongs to. The command Eseutil /ml [log file name] displays the header information. If a database is in a Dirty Shutdown state, all existing transaction logs from the checkpoint forward must be present before you can mount the database again. If these logs are unavailable, you must repair the database by running the command Eseutil /p to make the database consistent and ready to start.
If you have the log files, you can preform a soft recovery eseutil /r E0A /d "S:\Program Files\Microsoft\Exchange Server\DatabaseFolder" /l "L:\Program Files\Microsoft\Exchange Server\LogFolder" /a /8
Note.  Just specify the first log file, and do not put the extension ‘.log’, also you do not need to specify the database name, just the location.

AT
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
jjmartineziiiCommented:
I had this EXACT problem last week.

I moved the logs like you are asking out the directory to a mapped drive.

Later that night, i clicked circular logging and dismounted and remounted the database. That deletes all the transaction logs. Don't try to delete them because it will drag on forever.

0
 
ViTaMiNCommented:
Be aware that if you enable circular logging permanently you would need a continious backup solution or else you are not able to restore your database to the latest state in case of trouble.
solution would be to enable and then disable circular logging (with dbase (dis)mount in between)
or just backup the logfiles with a generic backup tool wichs changes the attribute of the file, exchange management should delete the backed up files at the next maintenance run.
0
 
StarfishTechAuthor Commented:
So if I enable circular logging just so I can purge these logs, when should I disable it again? The dilemma is that we had tons of logs to the point where we had to move some of them to another partition since it filled up the initial partition. Now the windows backup won't properly backup exchange or purge the logs probably because not all of the log files are there. Sounds like circular logging is a much easier way for me to go - however I just don't understand how circuiar logging can get rid of all the transaction logs without some kind of negative impact.
0
 
jjmartineziiiCommented:
Yes, if you:
1) enable circular logging
2) dismount the db
3) mount it again,
4) disable logging
5) dismount the db
6) mount it again

You would have cleared all the transaction logs and started to log them again.

I'm not a backup expert but if you are able to do a full backup after step 6, you don't NEED those transaction logs unless you have to restore to a db state before said full backup.
0
 
StarfishTechAuthor Commented:
ok, but is there risk of data loss here?
0
 
endital1097Commented:
yes, if you enable circular logging then were to lose the database before a backup, you would lose all data between the last backup and now
0
 
StarfishTechAuthor Commented:
ok, we plan on enabling circular logging to clear all the logs. We will then disable circular logging and run an immediate backup. I just wanted to make sure that enabling circular logging all on its own wouldnt result in data loss
0
 
jjmartineziiiCommented:
No it won't unless, like endital1097 says, you lose the data before a full backup.

I can confirm this as I recently did this.
0
 
StarfishTechAuthor Commented:
i have 3 mailbox databases. Should i do them all at the same time or one at a time?
0
 
endital1097Commented:
i would do it one at a time
0
 
jjmartineziiiCommented:
Matter of choice.

I personally would do one at a time.
0
 
endital1097Commented:
any update on the status
0
 
StarfishTechAuthor Commented:
Yes, it worked great! Thanks for everyone's help. I do have one last question. Now that the logs are manageable, I've started to backup the exchange database using windows 2008 server backup. I would like for the backup to automatically flush the log files so that this is never an issue again. If I run a ONE TIME BACKUP, it does give me the option to do a VSS full backup which will clear the logs - however if I create a scheduled backup, it doesn't give me this option. Will it just automatically flush the logs? How can I tell that it is doing this? How many transaction logs is a healthy amount?
0
 
StarfishTechAuthor Commented:
Unfortunately this guy took these screen shots from 2008 R2. Apparently, for whatever reason, Windows 2008 R2's Backup is a little different. It allows you to chose specific files for backup unlike 2008 standard sp2.
0
 
endital1097Commented:
i think there are limitations with 2008 non-r2
i'm looking into it
0
 
ViTaMiNCommented:
Hello,

I had this issue once, if I remeber correctly you need tgo register the exchange vss writer with windows backup. here's a link (in Dutch).
Let me know If you need help.
http://www.wardvissers.nl/2009/09/29/windows-server-backup-applications-grijs-vss-snapin-exchange-2007-sp2/
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

  • 7
  • 6
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now