nostros icon indicating copy to clipboard operation
nostros copied to clipboard

Relays list needs of local backup/restore method

Open serrq opened this issue 2 years ago • 12 comments

Recently I added some relays to Nostros. I assume that I will lose them if I haven't a backup of them.

Rewriting them from skratch is too much tedious.

So why do not create a local backup/restore method in order to charge it when one buy a new phone?

serrq avatar Feb 07 '23 05:02 serrq

I think this is in sync with this issue, yo can just export everything https://github.com/KoalaSat/nostros/issues/78

KoalaSat avatar Feb 07 '23 11:02 KoalaSat

Good idea, but with modular backup like this one. It has taken as reference design from Libretube app.

206887439-7b6e3129-cd9f-4545-bb39-b29659f03b5d

serrq avatar Feb 07 '23 11:02 serrq

@FrontendCrypto

KoalaSat avatar Feb 07 '23 11:02 KoalaSat

Let's cook a relay backup option.

devsigner-xyz avatar Feb 07 '23 12:02 devsigner-xyz

@serrq Please could you test this prototype and tell me if this fit to your needs? The task is export your backup and then import it.

https://www.figma.com/proto/ZY2QeasyxpDbqzLyHj8zpu/NostrOS?page-id=20%3A59080&node-id=1205%3A91242&viewport=-6203%2C-10606%2C0.42&scaling=scale-down&starting-point-node-id=1205%3A91242&show-proto-sidebar=1

P.D: I missed the modular export screenshot I could add it to the flow but I need to know exactly what you can export or desired options @KoalaSat .

devsigner-xyz avatar Feb 07 '23 19:02 devsigner-xyz

It looks amazing. Might I choose the exact saved location when I perform a backup?

Optional: final draft will have a format like yyyy-mm-dd_nostros.something? It would be useful?

Keep in mind that the backup format you are building will need to be cross-platform. That is that if in two years we will have Nostros for Mac or Nostros for Linux the backup will must run on all Nostros clients.

serrq avatar Feb 07 '23 19:02 serrq

I was thinking about the default backup file name and I realized that it would be better to write it like this (to understand what your backup is when you move it to a shared computer (typically family) or if you have more than one account to identify it at first glance.)

yyyy-mm-dd_last8keysofyourpubkey.zip

serrq avatar Feb 08 '23 04:02 serrq

Great suggestion thanks, the only change I would do is the extension, I think .json is the standard and right choice, will help other tools and clients to understand what's the format

KoalaSat avatar Feb 08 '23 08:02 KoalaSat

Great suggestion thanks, the only change I would do is the extension, I think .json is the standard and right choice, will help other tools and clients to understand what's the format

You are the Messi of the development. 🙏

serrq avatar Feb 08 '23 09:02 serrq

Great suggestion thanks, the only change I would do is the extension, I think .json is the standard and right choice, will help other tools and clients to understand what's the format

What happen if I make more than one backup in the same day? To the file name I mean... your algorithm will add (1), (2), (3)... etc ???

serrq avatar Feb 08 '23 09:02 serrq

that's trivial we can add a way machines have to identify every second since 1970, it's called unixtime, that should fix the porblem

KoalaSat avatar Feb 08 '23 18:02 KoalaSat

that's trivial we can add a way machines have to identify every second since 1970, it's called unixtime, that should fix the porblem

👍

serrq avatar Feb 08 '23 18:02 serrq