maxpozdeev / mytinytodo

Todo list script
166 stars 50 forks source link

Ability to backup database and download it #21

Closed Go-rom closed 9 months ago

Go-rom commented 2 years ago

Hello,

thanks for this great tool !

I'm willing to share my password in order to allow some friends to edit the task lists. But before coming to that, i would like to be able to restore a backup in case of a critical mistake.

Know that in my case, MyTinyTodo runs with a Yunohost server and i'm just a user so i don't have an access to the files

Thank you

maxpozdeev commented 2 years ago

This is in my priority list to implement.

My thoughts - I want to create a backup as a sqlite database file. First step - create a file in 'db' folder. If sqlite database is used - just copy it to a new file. If mysql database - export all records to a new sqlite database file. Second step - download it if you want.

Restore. Upload a file to 'db' folder (probably in web interface) If sqlite - just replace db file. If mysql - remove all records and insert new from sqlite.

Does it need to create a backup while restoration process?

Any suggestions are welcome.

Go-rom commented 2 years ago

Well, i'm no dev but wouldn't be easier to process an xml file ?

Plus it would be readable by any text editor

Otherwise, sqlite database seems fine to me.

maxpozdeev commented 2 years ago

Yes, XML is the second to consider.

qwertfisch commented 2 years ago

Or JSON for that matter, which seems easier to read, if you have just data without much complex structure (like todo items). There are no XML start and end tags cluttering the export file. On the other hand JSON needs escaping of double quotes, backslashes and several whitespace characters (XML needs less escaping using CDATA and preserves the raw text).

maxpozdeev commented 1 year ago

Backup & restore feature will be introduced in v1.8, as an extension as for now.

maxpozdeev commented 1 year ago

It will use XML as a backup file.

Go-rom commented 1 year ago

Great news thanks !

maxpozdeev commented 9 months ago

Closed as completed