
Here’s what MaxDB actually supports, and how to set up automatic, date‐based backup file names:
What MaxDB Supports for File Naming in Backups
- For data backups to file, you can use placeholders in the filename. (SAP Help Portal)
- The supported placeholders (as per SAP) are:
#YYYY— year (SAP Help Portal)#MM— month (SAP Help Portal)#DD— day (SAP Help Portal)#hh— hour (SAP Help Portal)#mm— minute (SAP Help Portal)#ss— second (SAP Help Portal)
- For log backups, MaxDB adds a sequence number automatically (e.g.,
.001,.002, …) when writing to files. (maxdb.sap.com) - The “Name” of the backup template in MaxDB does not influence the name of the generated backup files. (maxdb.sap.com)
✅ How to Set Up Daily Backup With Auto-Date File Names (Correctly)
- Create a Backup Medium (File)
- In MaxDB Database Studio (or via
dbmcli) define a medium:- Device/File: e.g.
/your/backup/path/DBBACK_#YYYY-#MM-#DD.dat - Type:
FILE - Other properties (block size, overwrite, etc.) as needed.
- Device/File: e.g.
- In MaxDB Database Studio (or via
- Create a Backup Template
- Use this medium in your data backup template.
- Choose Complete Data Backup or Incremental, depending on needs.
- Schedule a Job
- Set up a job (via Database Studio / your scheduler) to run the backup template daily.
- Each run will generate a new file name because of the date placeholder (e.g.
DBBACK_2025-11-24.dat).
⚠️ Important Notes / Limitations
- No native “counter” placeholder like
%for data backup filenames: MaxDB doesn’t support an auto-incrementing counter for data backups via placeholders. The sequencing (.001,.002) is more for log backups. (maxdb.sap.com) - If you need both date + incremental count, you may need to handle this via scripting +
dbmcli(e.g. a shell / batch script that checks existing files and sets a filename accordingly when callingbackup_template_create).
If you like, I can write a sample shell script (for Linux) or batch script (for Windows) + dbmcli commands to implement daily MaxDB backup with date + incremental numbering — do you want me to do that?