Comments (3)
Today I tried it to fix it myself and it seemed it worked:
identify container id of postgres container
pgid=$(docker ps -a | grep postgres:9.6-alpine | awk '{print $1}')
start bash inside postgres container
docker exec -it $pgid /bin/bash
bash-4.4#
connect to database
bash-4.4# psql -d hackmd hackmd
psql (9.6.13)
Type "help" for help.
hackmd=#
find Notes that are empty and have no title
hackmd=# select id from public."Notes" where ((title = '') IS TRUE) AND ((content = '') IS TRUE);
id
--------------------------------------
57670c01-7d4c-4bec-bb20-99d2b950f6e0
a3b03a5d-c490-41ff-85f4-c8b58d2127a8
887decc9-0230-40ca-9364-d96f273c1989
964e41e3-12d4-4985-b4ca-2358e8b4f949
f2dd2041-0b72-40ed-bd86-83e437d6557d
(5 rows)
delete above notes by id
hackmd=# delete from public."Notes" where id = '57670c01-7d4c-4bec-bb20-99d2b950f6e0';
DELETE 1
hackmd=# delete from public."Notes" where id = 'a3b03a5d-c490-41ff-85f4-c8b58d2127a8';
DELETE 1
hackmd=# delete from public."Notes" where id = '887decc9-0230-40ca-9364-d96f273c1989';
DELETE 1
hackmd=# delete from public."Notes" where id = '964e41e3-12d4-4985-b4ca-2358e8b4f949';
DELETE 1
hackmd=# delete from public."Notes" where id = 'f2dd2041-0b72-40ed-bd86-83e437d6557d';
DELETE 1
verify by exporting user data
From the CodiMD Web interface choose Export user data
and download archive.zip
. Open archive.zip
with an unzip utility and verify that all markdown files have names based on their title. The files like
.md
-1.md
-2.md
-3.md
-4.md
-5.md
should be gone!
from hedgedoc.
These somehow made it into your database. I would guess that free url mode is configured, and that the missing images were requested by a browser, creating an empty document in the process. That document has no title or headline, so we have nothing to create a filename from.
So it's probably not directly caused by a crash.
from hedgedoc.
These somehow made it into your database. I would guess that free url mode is configured, and that the missing images were requested by a browser, creating an empty document in the process. That document has no title or headline, so we have nothing to create a filename from.
So it's probably not directly caused by a crash.
Ok. Is there a simple way for me to cleanup these strange documents. I think I would be able to connect into the postgres container and fire up some sql commands there. Any suggestions?
Thanks in advance
from hedgedoc.
Related Issues (20)
- Pass config option `sslCAPath` to passport (authentication library)
- Add stats to user list
- Export user data with images HOT 1
- Update Authelia Auth Documentation
- Document Google Cloud Storage as s3 media backend HOT 6
- Implement support to serve media from private buckets HOT 1
- Can't paste image HOT 4
- Custom emojis HOT 1
- Store user-provided access tokens in CredentialsContainer
- Offer automatic "system" light/dark theme switching using `prefers-color-scheme` HOT 1
- Edit button redirects to wrong link HOT 2
- Re-add buttons for switching editor mode between View/Both/Edit
- Codeblocks syntax highlighting and background
- Documentation for project setup HOT 5
- support rendering csv codeblocks as tables HOT 1
- Kanban board renderer HOT 2
- Wider tables in view-only mode HOT 1
- Improve standard emoji support HOT 2
- Double-click to jump to source HOT 1
- keyboard support: [tab] and overlays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hedgedoc.