The device you use more often will definitely have a larger size than the others, even if the data is the same.
This is because every time you make a change to a form, record, field, etc., Tap Forms creates a new revision of that object. Up to 20 revisions of every object are still kept around in the database. And also if you delete items, that also creates new revisions. So if you were to import records, delete them, then import again, your database file would be larger than if you had only just imported the one time. The deletions don’t make the database file smaller.
When sync happens, just the latest revision is synced across. So none of the older revisions will be in the database on the target devices. Only the source device where the edits were made would have this extra data.
This is how the CouchbaseLite database engine I’m using in Tap Forms works.
You can compact the database and recover some space by going to the Preferences window, then Maintenance. Then click Compact Database. That will purge deleted records and attachments. You may see the database size increase initially, but if you close and re-open the document, it will go back down. This is due to the vacuuming process that happens after a compact occurs. A log file is created along side the database file which skews the database size calculation.
Thanks,
Brendan
Hello Brendan,
Thanks for your quick response. In the meantime I did some research and found the form using the function “recover deleted items” (don’t know if I translated it right, I’m using the Dutch version). I could recover it, had to do some renaming and to redo the related fields but the data still were there. So things are ok for now.
To prevent this a backup doesn’t do the whole job I read… the templates are not in backups right?
I’m setting up a template-form with the idea to share it with others. The risk is that others who are not used to the UI delete things accidentally so I want to understand the possibilities to repair accidents…. :-)
Maybe it is possible to secure things, most ideal would be a runtime version where others cannot maintain forms etc.
Hi Jonathan,
Unfortunately it’s a complicated thing to provide undo for deletions. The Recover Deleted Items was my attempt, but it’s not always successful. And it’s definitely not successful if you compact the database. Because that throws away all the old revisions of the object in the database.
I suppose one way to handle this would be never to delete anything. To simply mark objects as having been deleted but don’t actually delete them and don’t fetch ones that have been marked as deleted. Then when you undo, I would just flip the is_deleted bit and the record would be restored. I’d have to modify the Compact Database routine to purge records that have been marked as deleted. In reality though the Compact Database function already does this, but at a lower level based on how CouchbaseLite manages its record.
So it’s a fairly big job, but certainly doable at some point.
The recover deleted items was confusing and didn’t have the record.
So I guess what I’d like to see is something like Edit>Undo Delete, in the event of an accidental delete. I don’t code so i don’t know how involved this would be.
On the Mac under the File menu there is a “Recover Deleted Items” that might allow you to get back the record you deleted. There is usually a warning that deleting a record isn’t undoable though, you can go into preferences and reset warnings to get prompted before you delete a record.
Hello.
On occasion I accidentally delete a record (Command-Delete). There apparently there is no way to Edit>Undo Delete record. There is just an option for delete entry.
Is there a way to recover a record that has been (acciidently) deleted right after the accident?
This is really the only thing that makes me crazy using TF.
Thanks.
JL
Compaction behind the scenes cleans out old edits and deleted records that are retained for purposes like sync and is what “recover deleted items” uses. How often is a little hard, it doesn’t hurt per se (especially if you don’t use P2P or CouchDB sync) but you can reduce down your document size a little bit depending on what you’ve done. There is some limited amount of retention already (I have in my head 20 revisions, Brendan would know exactly) but if you have a lot of records then those 20 revisions can add up.
I did on the Mac, but it didn’t find anything. Is there a Recover Deleted Items function on the iPhone?
Yes, iCloud didn’t work for this I waited days and days but it wasn’t complete.
If you compact the database, it does purge old revisions of records from the SQLite file. Did you try the Recover Deleted Items function to recover your contacts?
And if you’re going to sync a 25 GB file, I would never use iCloud for that. It’ll take forever and may not complete. Your best bet is to use Apache CouchDB for that.
That makes sense then. I will definitely have to reduce the size of all photos in order to have a manageable database.
Perhaps related: I constantly use the search field in the list view, frequently and quickly. About every 3 times I search the app crashes. So frustrating! I virtually type the name and right before I want to click the search button, the app quits. I launch again, and it’s good for another 2-3 searches.
Because I had this problem with syncing I didn’t compact the database yet, although perhaps it could help? Because I was hoping without compacting I could potentially recover contacts? What should I do? Thanks.
Daffy,
I am truly sorry to hear that you are unwell, and hope that you are able to have a successful recovery. It was very nice of you to reply. Wishing you the best, Wayne.
Hi Brendan,
I have checked the ‘Recover Deleted Items’ window and the only things in it are the items I actually deleted, rather than the items that deleted themselves, this makes me think perhaps they are not ‘deleted’. Is there anywhere else they might be?
I will email you the videos, I apologise that the longest one is extremely boring. I was leaving it running in the hope it would show something happening.
I will send you the file too. You never know, there might be something in it that I have missed or set up incorrectly. Whatever it is, it’s happening on both my main databases. It could be happening on my smaller databases, but I don’t use them that often, so haven’t noticed anything.
Thanks,
Nicky
You’re better off uploading the videos to Dropbox or some cloud service you can get a URL to and just email the URL to me.
As for what happened, I’m not entirely sure. When Tap Forms syncs it first asks iCloud if there’s any changes. It downloads them and imports the changes into its own copy of the database. Then it uploads any changes that haven’t yet been uploaded.
You could check the Recover Deleted Items window (accessible from the File menu) to see if the missing records appear there. Then you can recover them.
Or you can send me the file and I can look for them.
I needed to keep track of my receipts for an insurance claim, I was using tap forms to keep track of the receipts.
I would enter them on a table, and snap a picture of it.
I’m missing 39 images.
Both iphone and desktop
Sync has NOT worked for me with this app, god knows I’ve tried to get it to work.
How do I recover my 39 images?
Attachments:
You must be
logged in to view attached files.
I have a document (circa 200 MB) that ran on a MacBook and 2 iPads. I have recovered the document and resynced on the MacBook and 1 iPad, but I can’t get the document onto the 2nd iPad. AirDrop seems to send document okay but it doesn’t appear automatically in Tapforms on the iPad, so I have nothing to sync to. Can you help please?