![]() |
|
|||||||||||||||||||
|
prev
iDB Tutorial (cont.)
Backing Up iDB(Note: Currently 'restore' feature is available only in 'Pro' version. Backing up on 'Lite' would only provide you a copy of your data on your desktop for analysis and/or safekeeping.) iDB includes a web server for backups and restore. No special client needed to get a backup to a desktop computer; any web-browser can connect to iDB Server and backup/restore its databases. 'iDB Server' is an embedded webserver. It runs within iDB on the device. For backup and restore purposes you can connect to the 'iDB Server' running on the device, and go to the URL address provided by iDB displaying on your iPhone/iTouch device screen. To launch iDB Server, go to 'Console' and tap on 'Server' button on the toolbar:
![]() To be able to connect to the server, iPhone or iTouch device needs to be on a WiFi network. When launched, iDB Server will detect its IP address and provide the connection parameters to you. (URL and access credentials. See image above). The backup computer needs to be on the same network to connect to iDB Server. If iPhone is not on WiFi, if its wireless is turned off, even if iPhone may be connected to a network (say Edge or 3G networks), there is no way a desktop computer can find a device on someone's private Edge or 3G networks. For a desktop computer and iPhone/iTouch device to talk to each other, they both must exist on the same network. If iPhone/iTouch is on wireless, iDB will detect an IP address similar to: http://192.168.xxx.xxx. Your desktop computer should also be on the same subnet. If you run 'ipconfig' on your Windows computer, or '/sbin/ifconfig en1 inet' on a Mac, or '/sbin/ifconfig eth0' on a Linux machine, you should see your desktop computer's IP address also start with 192.168.xxx... Using a web-browser you can connect to that URL iDB Server provided you on iPhone
screen, then you can backup/restore your databases:
![]() Connect to the iDB Server URL, enter login/password, choose 'Backup' and submit. iDB will send a database dump file to your browser. Backup dump is a regular CSV (comma separated value) file. The file is named 'iDBDumpYYYYMMDDHHmmss.csv', where 'YYYYMMDDHHmmss' represents date/time in year, month, day, hour, minutes, and seconds. Depending on the settings, your browser may ask you what to do with it, may save it to disk without even asking, may launch an application (like a spreadsheet) to process the content, or may even display the content right inside the browser. In any case you want to save it to a known location in your computer. Say, if Safari browser opens the backup content automatically, you can change the settings as: Preferences -> General -> uncheck 'Open safe files after downloading'; so the database backup gets downloaded without being opened. For other browsers you may want to set them in a similar way, so you can save the backup to a known location.
Restoring from a Backup(Note: Currently this feature available only in 'Pro' version.) To restore a backup, just select 'restore' option after connecting to the server and
'Submit'. It will ask for the name of a dump file:
![]() Provide a previously saved backup filename and submit. iDB will then restore the databases in the backup. If those DBs already exist on the device, existing content will be wiped-off first before the backup is restored. If any database was deleted after the backup, restore will re-create it. One may end up with a question: "I did a restore and immediately had a backup. How come the latest backup is different than the original I restored?" 'Restoring' does not tinker with new databases created after the backup. It only restores whatever was backed-up earlier. Therefore you may take a backup, delete all databases in the device, then create new DBs, restore from the backup, and then take a second backup immediately. The second will be bigger than the first backup dump; it will have both old and the new databases.
Changing Database EncryptionDatabase encryption is set at creation-time. Once created, you can't change an individual DB encryption mode. However, in restore-time you can choose to restore the whole backup as 'encrypted' or 'plain'. After all, restore process will re-create all backup databases, providing an opportunity to set the encryption type. That would be one way to change database encryption; changing them all. To change a single database encryption, you may want to create a new database of the same type with desired encryption mode, and move all the records from the first one to the latter. Once finished, you then can delete the first (and empty) database. Backup dumps are regular CSV files. Hence in theory you can take a backup, then get a second copy of the backup saving the original one for safe-keeping. Open the second copy in a text-editor, remove all unrelated databases, then you can restore the shortened backup file in desired encryption mode. If you want to do that, make sure you have the original backup intact. That way if something is messed up, you can always go back and restore the original.
ConfigurationIn 'Console', tapping on 'Config' at the bottom toolbar (also exists in Database List and
Record List screens) brings up the Configuration Settings:
![]() Here, the first group is "Passwords" that was covered at the beginning of this tutorial extensively. As long as you don't set your admin passsword, iDB will keep warning to set it until you do so. Please set it now, if you have not done it so far. The second group is "iDB Server Settings". When launched, iDB Server auto-detects its IP address, but picks its login/password and the port number from this configuration setting. Make sure to modify server authentication parameters and use stronger login/password for iDB Server. At this point it doesn't hurt to elaborate more on 'iDB Server'. iDB is a native iPhone application. As such it runs strictly on the iPhone/iTouch device. iDB is not a web-application; it does not need anyone's website to operate. 'iDB Server' is an embedded webserver, running within iDB on the device. For backup/restore purposes you need to connect to the 'iDB Server' on your device by going to the URL address provided by iDB displaying on your iPhone/iTouch screen. You must not go to http://www.idbmaster.com website or any other website and try to log-on with the login/password parameters you set up in the configuration group above. The third group of configuration is "Miscellaneous":
![]() In the miscellaneous group, 'Start screen' tells iDB where to go to right after login. If no login password is set, iDB would start directly on that screen. Second parameter is 'Pause Recovery': iDB is a very safe data manager. You can set a strong password and keep all data encrypted to make it resilient against hacking. Yet, if iDB is 'paused', and consequently if you lose your device, someone can simply re-launch iDB and go straight back to the exact state where iDB was paused. Therefore by default 'Pause Recovery' window is limited, and it is only allowed within 15 minutes after iDB was paused. You may modify pause recovery window, and set it to '0' to disable it completely. Allowed 'Pause Recovery' values is between 0 to 720 (minutes). 'Sound Effects' would turn on-off the chirping sound on iDB buttons. However, iPhone keyboard or picker are not effected by this setting. To turn them on/off, you need to go to iPhone's Settings->Sounds->KeyboardClicks. The last configuration item is 'Exit upon Sleep'. This setting attempts to cover one last security hole: Suppose you lost your device while it was running iDB. It is not that unusual not to exit from an application and just put the device in your pocket. So iDB was on, and the device slipped out of your pocket in a movie theater... When someone finds it, the device will be found in a state where iDB is still running, undermining all the security measures we've taken earlier. Since iDB was not paused, even expiring 'pause recovery' window is not going to help. 'Exit upon Sleep' settings addresses that problem. If turned on, iDB will exit when device goes sleep for screensaving. Upon awakening, recent versions of iPhone O/S will realize the last running application was terminated, and it will attempt to restart it. However that will either hit iDB login screen, or if login password was not set, it will take iDB to the startscreen without admin privileges. 'Exit upon Sleep' is off by default only to be backward compatible in behaviour with earlier versions of iDB. If you've been storing private data to iDB, you may want to turn this setting on. 'Exit upon Sleep' is not a foolproof mechanism on iTouch devices. It uses a feature of the operating system to detect the sleep state of the device, however, many iTouch versions of the O/S doesn't function properly to provide this feedback. This is an Apple bug; we did not turn off this feature on iTouch devices, hoping that the issues will be permanently addressed in a near version of the O/S. If you are an iTouch user you may want to test this feature and rely on it
accordingly. (Either wait until the device goes to sleep, and wait it up to see the
state of iDB. Or simply put the device into sleep yourself by pressing on the
sleep/wakeup button.)
|
|