![]() ![]() Debian user for owning Containers (maybe numerical user id is more useful)Įcho "directory not existent. # Docker instance name is normally like this HOSTPGDIR=/containers/joplin-server/data/postgres/psql-backup # Where does joplin server / PostgreSQL container reside on host: # Where is PSQL Data found in dockerized PostgreSQLĭOCKERPGDIR=/var/lib/postgresql/data/psql-backup What I use from cron is the following script, that might be useful for people hosting an own What I've found in the forums is a few one liners for a Postgres dump. If I understood correctly it's sufficient, backing up the postgreSQL database. ![]() I'm using joplin-server (dockerized) and really happy. ![]() If you (anyone reading this thread in fact) can support me with terminal code achieving what I would like to do.You can confirm I understood the script properly.So if I want to keep 5 versions, and there are already 5, delete the oldest one, and create the new one. On a regular basis -> from your script it seems to be a script you run manually?Īnd ideally, I'd like to keep x versions, so have a check on how many version there is in the back up directory, if I have "maxed out" the number of version, delete the most ancient one, and add the new one. Reason why I tried to understand is I'd like to create a script to back up my notes, ie, basically have a script which makes :Ī JEX export to a specific location (I believe I can use part of your script to do that) Git commit -m "Update" -> I read it changes the head, what is it? Where? Does it change the name of the file? > I read it is adding the file to the indexation, correct? $JOPLIN_BIN -log-level debug export -format raw "$BACKUP_DIR" -> log-level debug I guess is a type of log, a txt file to show you if everything went well, and if not what could it be, correct? Then you export in RAW format, into the backup directory, correct? Why not in JEX? Is it because your backup is only for the app (since you are the developper)? So I guess I could change that to JEX for my own script right? Rm -f resources/* -> delete all pre-existing file in the resources folder -> I saw that resources folder in the pack content (I'm on Mac), but are those resources backed up when you only back up the Joplin.bin file? Rm -f *.md -> delete all pre-existing md file So this means you are backing up a non crypted version of the app, correct?Ĭd "$BACKUP_DIR" -> you (the script) goes into the backup directory $JOPLIN_BIN e2ee decrypt -> is this needed all the time? Let's say I don't use encryption for my notes, but maybe Joplin.bin is encrypted? I will most likely use encryption, but just checking my understanding. $JOPLIN_BIN sync -> are you here synchronizing the version on your desktop? Which means you have a sync version somewhere else, and you make sure you sync everything before backing up, right? JOPLIN_BIN="$HOME/.npm-global/bin/joplin" -> you are saying where the Joplin.bin file is I'm very new to all this, slowly but surely moving away from "proprietary" solutions, so hope you won't loose your patience with my questionsīACKUP_DIR="/path/to/backup_dir" -> you specify the backup directory That might be easier to automate and Nextcloud should also keep a history so you get benefits similar to using Git. Unlike the ENEX format, JEX is a lossless format so you can export and re-import and get everything back including tags, resources, notebooks, and all metadata.Īn alternative to all this is indeed to backup the sync directory. I have this running because I often run dev versions of Joplin so I need a robust backup in case I mess up, but for normal use a simple export to JEX format is sufficient. $JOPLIN_BIN -log-level debug export -format raw "$BACKUP_DIR" ![]() JOPLIN_BIN="$HOME/.npm-global/bin/joplin" This is the cron script I use for backup: #!/bin/bash Even better if you can version this in a Git repository. Best way, if you can, is to use the command line tool along with the export command and export at a regular intervals from a cron script. ![]()
0 Comments
Leave a Reply. |