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 ifSMSCUnicodeexists. 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 messageSubmitβ message to sendStatus_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:ReadUnReadSentUnSent
Numberβ recipient number.Nameβ name of the message.Lengthβ length of the message text.Codingβ coding of the message:8bitβ binary messageDefaultβ GSM encoding, up to 160 chars in the messageUnicodeβ 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. π«Ά
π Copyright
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
- arch rolling: gammu 1.45.0-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms