Android Question Best Way for backup sqlite database

Discussion in 'Android Questions' started by Binary01, Feb 14, 2015.

  1. Binary01

    Binary01 Member Licensed User

    Hi,

    I created my sqlite database app on my android device. I add new data with this app.
    Now I want to make backup copy of this file to other storage location (SD Card, external storage, or computer or etc.).
    How can I do?
    Thanks
     
  2. parijs

    parijs Active Member Licensed User

    There will be many ways but I upload my db to dropbox
     
  3. warwound

    warwound Expert Licensed User

    In theory you just close the database if it's open and copy the database file to your backup location.
    Watch out though, SQLite sometimes uses additional temp files such as journal and wal files.

    If either of these other temp files exist and you do not copy them along with the 'main' database file then your backup will likely be corrupt and useless.

    Have a read:
    https://www.google.co.uk/search?q=sqlite+journal+wal+files
     
    derez and Peter Simpson like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice