moving log files...

swjohnsonswjohnson Posts: 30
edited August 3, 2005 2:43PM in SQL Backup Previous Versions
Is there a way to change where the log files go instead of the default ..\Documents and settings\all users\application data\red gate\sql backup\log folder or to turn the default off?.

I know about the "LogTo" option but if I use that I want to turn off the default path. The reason is that our C: volumes (where the default location for the log files are stored) are pretty tight as far as disk space and permissions and since we are running full backups every night and transaction logs every hour on over 250 databases, this grows very quickly and would become a management nightmare.

Any other tools to help manage this?

SJ

Comments

  • peteypetey Posts: 2,358 New member
    Options:

    - if you use the command line interface to perform the backups, you could set the all users profile setting to another folder only for the current session, which will cause SQL Backup to store the log to this other folder e.g.

    SET ALLUSERSPROFILE=E:\Alt\All Users

    You must create at least the \Application Data subfolder in this other path.

    - use a deletion tool that allows you to specify the age of the files to delete, though I haven't used any myself.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Hi

    If you are interested I use the fofiles command to delete files older than 3 days

    forfiles /P "C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log" /D -3 /C "cmd /c del @file /Q"

    I then run this command within a SQL Server job.

    Regards
    Scott
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I'd just posted a script that will delete old files as well, and it lets you specify the age.

    http://www.red-gate.com/messageboard/vi ... php?t=1114

    It could also be easily modified to archive the log files by changing the line
    file.Delete();
    to
    file.Move(path);
Sign In or Register to comment.