Skip to content

Latest commit

 

History

History
20 lines (18 loc) · 1019 Bytes

Backup_class_manual.md

File metadata and controls

20 lines (18 loc) · 1019 Bytes

Backup class manual

The following is an example of using all the methods of this class in Java.

Backup bckp = new Backup();

bckp.createBackup("secretKey");    // crete backup from database to the .xml file
bckp.importBackup("secretKey");    // import backup to the database
  • "secretKey" is the encryption / decryption password

WARNING:

If you enter a different secret key when restoring a backup than when it was created, the database will be restored with corrupted data.

In this case, under no circumstances should you make a copy of this data! Instead, restore the previous copy again with the correct password.


NOTE:

  1. Database backups are stored in backup.xml file in main directory. See example.
  2. During next backup new data are overriding old backup. Pay attention to it.
  3. When importing a backup to the database, all rows are emptied! Please backup your data before importing, keeping to the point 2.