Backup System

110 views
Skip to first unread message

nobnago

unread,
Aug 10, 2011, 6:20:49 AM8/10/11
to AnkiDroid
Hi all,

since every now and then, people complained about deck loss, I started
work on a backup system. This will make work with AnkiDroid a lot
safer.

By now,
- on loading a deck for the first time a day, a copy is made before
the deck is actually loaded,
- backups are stored in subfolder "backup"
- backups are limited to an adjustable number, when reaching the
limit, old backups are deleted
- backup system can be disabled, backups will be deleted then
- backups for every deck can be deleted on deckpicker
- a message will be shown, if disc size is too low to copy the deck

The most important thing would be an algorithm which restores decks
(after confirmation) if loading fails. This is a very delicate thing
as it overwrites actual decks. Thus this should on all accounts be
avoided if deck loading fails only to minor things. Another option
would be, just to shown a message about the deck-backup folder.

What do you think? Any suggestions?

Cheers!

Norbert

Robert Siemer

unread,
Aug 10, 2011, 9:16:54 AM8/10/11
to anki-a...@googlegroups.com
Hello,

I don�t like _that_ kind of backup a lot, because it sounds like: �there
is a problem somewhere and we build a safety-net under it�. I prefer
�there is a problem, and we fix it.�

(but yeah, when it hits me, I prefer a net over nothing... :-)


Robert

nobnago

unread,
Aug 10, 2011, 9:50:09 AM8/10/11
to AnkiDroid
:-D You mean, the pressure is higher to solve things if it can destroy
your decks? This argument is indeed irrefutable...


On 10 Aug., 15:16, Robert Siemer <Robert.Sie...@backsla.sh> wrote:
> Hello,
>
> I don t like _that_ kind of backup a lot, because it sounds like: there
> is a problem somewhere and we build a safety-net under it . I prefer
> there is a problem, and we fix it.
>

Nicolas Raoul

unread,
Aug 10, 2011, 9:51:18 AM8/10/11
to anki-a...@googlegroups.com
@Everyone:
To clear any misunderstanding: backup will not be in the upcoming 0.7 so continue to backup your data often :-)
Backup will be available starting from 0.8, which will be released in a couple of months.


@Robert:
Below is a list of 1873 causes of crash (for a total of 12376 crash occurrences) that hit AnkiDroid from time to time:
http://ankidroid-triage.appspot.com/report_bugs
When you are done fixing them, we will disable backup :-D
Or in fact, we won't... because even if Android and AnkiDroid had zero bugs, the #1 reason of deck loss is human error, in particular USB disconnection while deck is being moved/copied.
So backup is a very needed feature actually!


@Norbert:
I like your plan!
How about a dialog allowing the user to restore the version she wants based on the file's date?
When restoring from a backup, the original could be renamed with a "_discarded20110810" prefix, and left there forever.

Cheers!
Nicolas Raoul

On Wed, Aug 10, 2011 at 10:16 PM, Robert Siemer <Robert...@backsla.sh> wrote:
Hello,

I don’t like _that_ kind of backup a lot, because it sounds like: “there is a problem somewhere and we build a safety-net under it”. I prefer “there is a problem, and we fix it.”


(but yeah, when it hits me, I prefer a net over nothing... :-)


Robert


On 10/08/11 18:20, nobnago wrote:
Hi all,

since every now and then, people complained about deck loss, I started
work on a backup system. This will make work with AnkiDroid a lot
safer.

By now,
- on loading a deck for the first time a day, a copy is made before
the deck is actually loaded,
- backups are stored in subfolder "backup"
- backups are limited to an adjustable number, when reaching the
limit, old backups are deleted
- backup system can be disabled, backups will be deleted then
- backups for every deck can be deleted on deckpicker
- a message will be shown, if disc size is too low to copy the deck

The most important thing would be an algorithm which restores decks
(after confirmation) if loading fails. This is a very delicate thing
as it overwrites actual decks. Thus this should on all accounts be
avoided if deck loading fails only to minor things. Another option
would be, just to shown a message about the deck-backup folder.

What do you think? Any suggestions?

Cheers!

Norbert


--
You received this message because you are subscribed to the Google Groups "AnkiDroid" group.
To post to this group, send an email to anki-a...@googlegroups.com.
To unsubscribe from this group, send email to anki-android+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/anki-android?hl=en-GB.


Fabien SK

unread,
Aug 10, 2011, 1:16:02 PM8/10/11
to anki-a...@googlegroups.com
Hi,

I fully agree with Nicolas. Most of the time, I can synchronize with my
computer (which is backuped everyday) every evening. But when I don't, I
can't afford taking the risk to lose my data, even if it is very
unlikely to happen. One of my decks has more than 4000 cards, which
represents more than 200 cards/day. If it lose a deck, I will have to
start from my latest computer backup, and it will take really a long
time to catch up.
So I think that's a good feature.

Fabien

Le 10/08/2011 15:16, Robert Siemer a �crit :

Wisam

unread,
Aug 10, 2011, 5:15:57 PM8/10/11
to anki-a...@googlegroups.com
I like the idea of having back up. No one knows when something can goes wrong.

nobnago

unread,
Aug 11, 2011, 3:47:56 AM8/11/11
to AnkiDroid
Yesterday, I did more work on this feature.

When opening a deck which seems to be corrupted (opening routines
return null), a message about that (and containing a link to the anki
repair page) is shown with three options:
- retry
- restore: this opens a dialog which contains all backups of this
deck, the users selects a backup, which is copied to the ankidroid
folder. The original file is moved to broken subfolder
- delete: deletes broken deck

even more important: If a deck is broken, it is not anymore shown on
deckpicker, that's why a restore routine is most important there. On
loading decks, all broken ones are collected and after loading is
finished, a message with the restore and delete option appears for
every deck.

Did I forget something? Should we always copy decks to the broken
folder when deleting them?

This needs to be tested a lot although I don't believe it threatens
decks in normal use (only an opening a deck, a deck is copied if
necessary). But we'll have to make sure that restoring works as
expected. I tried already a lot but I might have forgotten something.

Cheers!

Norbert

Nicolas Raoul

unread,
Aug 11, 2011, 3:59:04 AM8/11/11
to anki-a...@googlegroups.com
> Should we always copy decks to the broken folder when deleting them?
I would say yes.

A limit case is if someone's decks are in an incompatible Anki format
(it inferior or superior).
In this case, restoring backups will not solve the real problem.

Cheers!
Nicolas Raoul

clexidra

unread,
Aug 13, 2011, 5:12:51 AM8/13/11
to AnkiDroid
I think that a backup system is necessary.
Now I synchronize the decks with ankionline.
Reply all
Reply to author
Forward
0 new messages