cancel
Showing results for 
Search instead for 
Did you mean: 

to many log files from hana backups

Former Member
0 Kudos

Hi experts

In a client the backup is creating to many log files, and the problem is that this files are consuming the disk space very fast.

For you to have an idea yesterday the system generated 361 log files with 25 gb. the log file are being generated during all day with intervals of one hour.

we don't know if it is normal, but i would like you to help us.

Best regards

Accepted Solutions (0)

Answers (2)

Answers (2)

kaus19d
Active Contributor
0 Kudos

Hi ,

In this matter, I think the below links would be helpful for you,

cleaning up log files in $(DIR_INSTANCE)/backup... | SCN

Automatic delete expired backup catalog informa... | SCN

Thanks,

Kaushik

Jonathan_Haun
Participant
0 Kudos

This is something the admin has to maintain when normal logging mode is enabled. You need to prune the backup catalog and the log segment backups. The following SQL prunes the catalog and file system of both full and log backups.

BACKUP CATALOG DELETE ALL BEFORE BACKUP_ID <BACKUP_ID> COMPLETE;

Using SQL or HANA Studio GUI backup console, find a backup id representing the last set of backups you want to keep.

SQL example:

For example, find the backup id that will keep 5 days of completed backups and their log segment files, execute the following SQL.

SELECT TOP 1 min((BACKUP_ID)

  FROM SYS.M_BACKUP_CATALOG

  where SYS_START_TIME >= ADD_DAYS(CURRENT_DATE, -5)

  and SYS_START_TIME <= CURRENT_TIMESTAMP

  and ENTRY_TYPE_NAME = 'complete data backup'

  and STATE_NAME = 'successful';

In HANA Studio, you can simply right click the minimum backup ID you want to keep, in the backup console, and choose "Delete Older Backups". Check the box for "File System" to delete the files on the file system.

former_member230931
Participant
0 Kudos

As far as I know Hana studio does not have GUI for managing and deleting old backups. What do people use to clean-up older backups on  schedule? Do you run a script?

Thanks All

greg_niecka
Participant
0 Kudos

yes - there is a script that removes unnecessary backup log files.

check out this link below:

http://scn.sap.com/community/business-one/blog/2013/07/24/how-do-i-use-the-cron-to-schedule-a-backup

Jonathan_Haun
Participant
0 Kudos

HANA Studio's back console has an option to delete backup catalog entries and their associated files on the file system. Right click a backup catalog entry and choose "Delete Older Backups" to start the wizard.  Choose these options: