How to do Backup & Restore

@since 0.10.1 / @updated 20180531

Since version 0.10.6, you can backup data to google drive and restore from it in any device.

Before start to backup you data, if you are using android 7+, you have to allow the storage read/write permission first by using OS application info page or go to Data page and click REQUEST STORAGE PERMISSION button, then allow the request.

After permitted, there is an important information WORKING_FOLDER, that indicate where the backup files will be stored in the storage, i.e. /storage/emulated/0/bwDailyMoney. the location could be different in a different phone.

Whole data backup/restore (binary, machine read/write)

(recommended to do once a week)

Backup

Click BACKUP DATA

DM will backup current application(DBs, configurations) to WORKING_FOLDER/backup/last/

If you enable timestamp backup in preference, it also makes a copy at WORKING_FOLDER/backup/MONTH/DATE-TIME/.

  • *.xml : they are data stored in xml format, they are basically configuration or non-important data.
  • dm.db, dm_*.db: : the db files stored book account, record and other book-base data. dm.db is default book. dm_*.db is another book with id *.
  • dm_master.db : the db file store book meta and other data.

You are not suggested to do any modification on these files, it could cause app crash when restoring them.

It is OK to remove the backup that you don’t need it, especially the multiple timestamp backup files

Restore

Restore will erase all you current data, all books, accounts & records by replacing backup files.

Click RESTORE DATA

DM will restore the backup in WORKING_FOLDER/bwDailyMoney/last back to the application. remember, all your current data will be replaced.

Restore data will cause application restart.

To restore specific timestamp backup, just clear last folder, and copy files in date-time folder to last folder, then use restore function.

CSV file export/import (text, human readable)

CSV Exporting is basally for exporting human readable csv file and also could do some excel work, such as charting or analysis table. but It will lose some information which compares to the whole backup.

Export

Click EXPORT CSV

Then you can chose to export all books, working books, or only working book’s account. (Exporting account is a trick to import them in new book)

DM read all data and export them to several csv files to WORKING_FOLDER/csv/last

If you enable timestamp backup in preference, it also makes a copy at WORKING_FOLDER/csv/MONTH/DATE-TIME/.

  • accounts.csv, details.csv: they are working book’s cvs export without book id.
  • accounts-.csv, details-.csv, they are all books’s csv export with book id.

You can use csv to do Excel process, but You are not suggested to import them after you modified them or change the field encoding, it could cause app crash when importing them.

It is OK to remove the csv that you don’t need it, especially the multiple timestamp backup files

Import

Import will not erase data in the working book, it adds/append data to the working book.

CSV import only allows you to import working-book-csv files to the working book. The working-book-csv means the csv exported files that don’t have book id in name, i.e. accounts.csv, details.csv

Click IMPORT CSV

You are able to select a type to import, i.e. Working book(working-book-csv) or Working book(working-book-csv) account. it will append records and accounts to app’s working book or only account.

CSV import process is slow, it read records one by one and adds them to device , after some seconds waiting you can get how many data are imported.

by using export working book account, create/switch to new book, import working account, you can create a book that has existent account quickly

To import specific timestamp csv, just clear last folder, and copy working-book-csv in time-stamp folder to last folder. To import another book, rename book-csv to remove book id and copy them to last folder.

Backward compatibility consideration

To support older data backup or csv export, DM will also check WORKING_FOLDER/ after check WORKING_FOLDER/backup/last/ or WORKING_FOLDER/csv/last/ folder (last has high priority)

Leave Comment

Your email address will not be published. Required fields are marked *