memos icon indicating copy to clipboard operation
memos copied to clipboard

Export memos to file

Open akitakedits opened this issue 2 years ago • 7 comments

Is your feature request related to a problem?

I would like to use this app however I'm concerned about the ability to backup data or potentially export it for external use.

Describe the solution you'd like

A simple archive export with a folder structure that makes sense

Just an example:

memos.zip
  dd-mm-yyyy/
    resources/
    memo1.txt
    memo2.txt
    [...]

Additional context

No response

akitakedits avatar Dec 19 '22 01:12 akitakedits

What about simply copying over the .db file to a backup location?

jxpsert avatar Dec 20 '22 13:12 jxpsert

I would love to see this feature, not for backup purposes but to ensure users aren’t tied into a specific tool.

smoothml avatar Dec 31 '22 18:12 smoothml

This function is required. If you can export PDF or TXT, it is an acceptable choice.

i-iooi-i avatar Jan 15 '23 17:01 i-iooi-i

I just upgrade. An export/import database (into file) should help in the process. Maybe not an urgent feature but a good one :)

bonnebulle avatar Jan 21 '23 13:01 bonnebulle

I have a problem. Where are the image assets and other data saved when using the docker version? I want to back up the memos instance to prevent losing access because of circumstances.

erbanku avatar Feb 10 '23 15:02 erbanku

I Noob too, my first docker try . I do :

Backup files

1. Get Docker container id

( alpha_digit like 4334cf36a826 ) :

[EDIT] indeed you also can use container name, me, is "memos" (better use for automations like cron backups)[/EDIT]

docker ps

( optional : access to the terminal in the container )

docker exec -it 4334cf36a826 /bin/sh

( then check files presence )

ls -lh /var/opt/memos/
# then exit, back to host
exit

2. Backup files from container to your host ( here a Desktop folder )

docker cp 4334cf36a826:/var/opt/memos/memos_prod.db-wal ~/Desktop/memos_docker_save/

-> Do it for memos_prod.db + memos_prod.db-shm (I think necessary)

To Restore :

( test, try, before crisis time )

sudo docker cp ~/Desktop/memos_docker_save/memos_prod.db-wal 4334cf36a826:/var/opt/memos/memos_prod.db-wal

-> and other files

bonnebulle avatar Feb 14 '23 14:02 bonnebulle

#!/bin/bash
DATE=$(date +'%Y-%m-%d')
ROOTBKPFOLDER="/BACKUPFOLDER/Memos"
ROOTBKP=$ROOTBKPFOLDER/$DATE
# echo $ROOTBKP
cd $ROOTBKPFOLDER
mkdir $DATE

docker cp memos:/var/opt/memos/memos_prod.db $ROOTBKP
docker cp memos:/var/opt/memos/memos_prod.db-shm $ROOTBKP
docker cp memos:/var/opt/memos/memos_prod.db-wal $ROOTBKP

# CLEANUP
# ls -t | tail -n +10 | xargs -I {} rm -f ./{}

bonnebulle avatar Feb 19 '23 09:02 bonnebulle

Here is a website that can export Memos to a local zip, https://github.com/hyoban/note-convert . Try to use it. If you have any problems, you can open an issue, I will try my best to support.

hyoban avatar May 08 '23 01:05 hyoban

Here is a website that can export Memos to a local zip, hyoban/note-convert . Try to use it. If you have any problems, you can open an issue, I will try my best to support.

The exported resource images seem to be broken. The images resources can be shown normally on the Memos Web App. (The resources are in my object storage which links to Memos)

image

erbanku avatar May 08 '23 02:05 erbanku

@erbanku I haven't used object storage in Memos yet, I'll try to find out why

hyoban avatar May 08 '23 02:05 hyoban

@erbanku This problem has been fixed, if you have more problems, you can open an issue in https://github.com/hyoban/note-convert

hyoban avatar May 08 '23 02:05 hyoban

 memos:/var/opt/memos/

请教 memos:/var/opt/memos/ 在哪里?怎么知道我的docker在哪

woshichenghaibo avatar Aug 16 '23 12:08 woshichenghaibo

Issue is not in English. It has been translated automatically.


memos:/var/opt/memos/

Where is memos:/var/opt/memos/? How do I know where my docker is

Issues-translate-bot avatar Aug 16 '23 12:08 Issues-translate-bot

The earlier version only had memos_prod.db, but not memos_prod.db-shm and memos_prod.db-wal, please advise how to migrate, thanks

Upgrade the earlier version of the Memos instance, then migrate to the newer Memos instance?

erbanku avatar Sep 04 '23 07:09 erbanku