JSON Backup
Money Wallet supports a full backup that can be exported and imported. This contains more than just the transactions found in other export formats. See below for details)
Creating the Backup
Tap Left Menu > Settings > Database > Backup services. Choose whether you want the dump created in a cloud service ("storage access framework"), or just somewhere on your phone ("external memory"). Navigate to the folder you'd like it placed in, then tap the + button in the lower right corner.
It will create a file called backup_YYYY-MM-DD_HH-MM-SS.mwbx
(current time). This is a ZIP file containing:
databases
└── database.json
Any attachments you added to transactions will also be in the zip file.
Restoring the backup
Open the app's Left menu > Settings > Database > Backup services. Select "external memory" if the backup is on your phone, or "storage access framework" if it is on an SD card or cloud file service. You will be prompted to confirm before the import happens.
Structure of the Backup
The backup extension is .mwbx
but is actually a ZIP file. It contains any attachments you added. The main file is database.json
in JSON format.
The root object has the following keys:
key name | description |
---|---|
header | "header": {"version_code": 2} |
currencies | iso (three letter name), name, symbol ("$"), decimals (integer, for scientific notation), favourite (boolean) |
wallets | name, icon, currency (iso name), start_money, count_in_total (boolean), archived (boolean), index (integer, for display order) |
categories | name, icon, type (0 for income, 1 for expense, 2 for system), show_report (true if it should be shown in pie chart) |
events | name, icon, note, start_date (YYYY-MM-DD), end_date (YYYY-MM-DD) |
places | name, icon, address |
people | name, icon, note |
event_people | junction between events and people |
debts | type (0 for debt, 1 for credit), icon, description, date, wallet (UUID), note, money (integer), archived (boolean) |
debt_people | junction between debts and people |
budgets | money, currency (iso name), type (0=expense, 1=income, 2=category), category (UUID), start_date, end_date |
budget_wallet | junction between budgets and wallets |
savings | description, icon, start_money (integer), end_money (integer), wallet (UUID), end_date (YYYY-MM-DD), complete (boolean), note |
recurrent_transactions | description, category, money, direction (0 for expense, 1 for income), wallet (UUID), note, confirmed (boolean), count_in_total (boolean), start_date, last_occurrence, next_occurrence, rule (see RFC 5545 iCal format) |
recurrent_transfers | recurring transfers |
transactions | money, date, description, category (UUID), direction (0 for expense, 1 for income), type, wallet (UUID), note, event (UUID), confirmed (boolean), count_in_total (boolean) |
transaction_people | junction between transactions and people |
transaction_models | models of transactions: money, description, category (UUID), direction (0 for expense, 1 for income), wallet (UUID), place (UUID), note, confirmed (boolean), count_in_total (boolean) |
transfers | description, date, from (wallet UUID), to (wallet UUID), note, confirmed (boolean), count_in_total (boolean) |
transfer_people | junction between transfers and people |
transfer_models | models of transfers: description, from (wallet UUID), to (wallet UUID), money_from, money_to, tax_money, note, event (UUID), place (UUID), confirmed (boolean), count_in_total (boolean) |
attachments | file, name, type, size |
transaction_attachments | junction between transactions and attachments |
transfer_attachments | junction between transfers and attachments |
All records have an id (java UUID), last_edit (unix epoch timestamp of the last time it was changed), and deleted (true or false). Junctions use the UUIDs of the two entities they're attaching.
All dates are YYYY-MM-DD. All money amounts are integers which are converted to the proper amount by the currency's definition. For USD, 100 becomes "$1.00"
Some records have an icon, which always has the following structure. They're represented as strings, so for example
"{\"type\":\"resource\",\"resource\":\"ic_icon_cocktail\"}"
"{\"type\":\"color\",\"color\":\"#000000\",\"name\":\"S\"}"
key name | description |
---|---|
type | either color or resource (picture icon) |
color | hexadecimal RGB, for type: color |
name | the letters in the icon, for type: color |
resource | the name of the icon, for type: resource |
More details can be found in com.oriondev.moneywallet.storage.database.backup.DefaultBackupExporter
and com.oriondev.moneywallet.storage.database.json.JSONDataOutputFactory