GAMMU-SMSBACKUP(5)

πŸŽ€ GAMMU-SMSBACKUP πŸŽ€

okay so bestie, this is the page for gammu-smsbackup β€” it's the file format for those SMS backup files that gammu(1) makes. yes, the whole page is just about what's inside the file. no cap.

the backup format is a text file, encoded in whatever the current encoding of the platform where Gammu is running happens to be. so it's just... text. very demure, very mindful.

this file uses ini file syntax, see INI file format <#ini>. iykyk πŸ¦‹


✨ SECTIONS ✨

the file is made of sections, and every section name starts with SMSBackup. when Gammu creates the backup file, it slaps three digits on the end of that to define the order. but here's the tea: when reading a backup, anything after the SMSBackup text is completely ignored, and literally everything that begins with it gets processed. so you can name a section SMSBackupFoo and it will still get processed. main character energy, honestly. πŸ’…

the number of messages in a backup file is currently limited by GSM_BACKUP_MAX_SMS <#c.GSM_BACKUP_MAX_SMS> which is 100000 at the time of writing this document. that's a lot of texts, bestie. 😭

πŸ’Œ SMSBackup section

each section interprets one physical SMS message β€” like, one message part in the case of multipart messages. so a long message split into chunks gets multiple sections. periodt.

🌸 Decoded text

for SMS backups that Gammu created, there's a decoded text sitting as a comment just after the section name:

[SMSBackup001]
; This is message text

the text can be split onto more lines if it's too long, or if the original message had new lines in it. multi-line queen. ✨

Note: this is the easiest way to get the message text, however it's also the least reliable one, because it's stored in the comments in the file. pretty but fragile, like me. πŸ™ˆ

🧚 Variables

the following variables can be defined for each SMS:

  • SMSC β€” text representation of the SMSC number, but it's not used by Gammu if SMSCUnicode exists. the unicode one wins, sorry babe.
  • SMSCUnicode β€” hex encoded UCS-2 string with the SMSC number.
  • Class β€” message class.
  • Sent β€” timestamp of when the message has been sent.
  • PDU β€” message type, and it's one of these:
    • Deliver β€” received message
    • Submit β€” message to send
    • Status_Report β€” message to send with delivery report
  • DateTime β€” timestamp of the message (sent or received).
  • RejectDuplicates β€” whether the receiver should reject duplicates.
  • ReplaceMessage β€” ID of the message to replace.
  • MessageReference β€” message reference number as generated by the network.
  • State β€” the state of the message:
    • Read
    • UnRead
    • Sent
    • UnSent
  • Number β€” recipient number.
  • Name β€” name of the message.
  • Length β€” length of the message text.
  • Coding β€” coding of the message:
    • 8bit β€” binary message
    • Default β€” GSM encoding, up to 160 chars in the message
    • Unicode β€” Unicode encoding, up to 70 chars in the message
  • Text00 ... TextNN β€” numbered parts of the message payload. yes, numbered. it's giving organized. πŸ”₯
  • Folder β€” ID of the folder where the message was saved.
  • UDH β€” user defined header of the message.

⭐ EXAMPLE ⭐

the backup of a message can look like the following, and yes you're gonna want to screenshot this:

[SMSBackup000]
#ABCDEFGHIJKLMNOPQRSTUVWXYZ
#
SMSC = "+4540590000"
SMSCUnicode = 002B0034003500340030003500390030003000300030
Sent = 20021201T025023
State = UnRead
Number = "+4522706947"
NumberUnicode = 002B0034003500320032003700300036003900340037
Name = ""
NameUnicode =
Text00 = 004100420043004400450046004700480049004A004B004C004D004E004F0050005100520053005400550056005700580059005A000A
Coding = Default
Folder = 1
Length = 27
Class = -1
ReplySMSC = False
RejectDuplicates = True
ReplaceMessage = 0
MessageReference = 0

πŸ‘‘ Author

Michal ČihaΕ™ <michal@cihar.com> β€” we stan. 🫢

2009-2015, Michal ČihaΕ™ <michal@cihar.com>


that's the whole page bestie, go forth and back up your texts responsibly πŸ’…βœ¨

version 1.45.0, dated Sep 16, 2026 β€” mwah, this doc ate and left no crumbs πŸŽ€πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from