Skip to content

Add a ytl-tasks recipe for creating dbdata archive#115

Open
jan-aleksi wants to merge 1 commit into
mainfrom
feature/ytl-task-archive-digabi2-dbdata
Open

Add a ytl-tasks recipe for creating dbdata archive#115
jan-aleksi wants to merge 1 commit into
mainfrom
feature/ytl-task-archive-digabi2-dbdata

Conversation

@jan-aleksi
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread packages/ytl-linux-tasks/justfile Outdated
remove-virtualbox:
'./scripts/2026-04-16_remove-virtualbox.sh'

dbdata-filename := "digabi2-dbdata.tar.gz"
Copy link
Copy Markdown
Contributor

@linuswillner linuswillner May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voisikohan tämän generoida automatiikalla, vaikka lisäämällä päivämäärän tähän nimeen? Muutenhan se ylikirjoittaa sen vanhan joka kerta. 🤔 Sitten ei tarvitse muuttujaa.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mitä se haittais? Kiinnostaako kouluja säilöä vanhoja tietokantadumppeja? Mä ajattelin, että tää tehtäis vaan tarpeen mukaan ja lähetettäis heti abitti-tukeen, jolloin ei ole väliä, vaikka ylikirjotettais vanhat.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voi tähän laittaa jonkun timestampin, jos se on arvokasta, mutta en ole varma onko se. Tai ehkä se olis meille, jotta nähtäis tiedoston nimestä, että dumppi on "tuore".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mm. tätäkin ajoin takaa joo, jos koululta saa 2, niin voi päätellä kumpi on uudempi. On olemassa tiedoston muutosajat juu, mutta eri järjestelmät voi mankeloida niitä; juuri kukaan nyt ei mankeloi niitä nimiä. Et siitäkin näkökulmasta olis hyvä.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ei niitä vanhoja kannata hilloa ei, mutta ei mun mielestä ole meidän vastuullamme olla käyttäjän tiedostotalkkari kuinka laajissa määrin tahansa. 😄 Ei näitä nyt varmaan niin massiivisesti tehtailla, että tästä muodostuisi ongelma.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oisko nyt hyvä?

@jan-aleksi jan-aleksi force-pushed the feature/ytl-task-archive-digabi2-dbdata branch from cb652a7 to 09879e8 Compare May 13, 2026 07:28
Comment thread packages/ytl-linux-tasks/justfile Outdated
timestamp=$(date '+%Y-%m-%d-%H%M%S')
archive_path="{{ invocation_directory() }}/digabi2-dbdata-${timestamp}.tar.gz"
mountpoint=$(docker inspect digabi2_dbdata | jq -r '.[0].Mountpoint')
echo sudo tar cvzf "${archive_path}" "${mountpoint%/*}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tää ei toimi, koska tossa edessä on echo. Kokeilin tosin ajaa käsin sen ajaman skriptin ja se tuotti ihan oikean lopputuloksen

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hups 😂

@jan-aleksi jan-aleksi force-pushed the feature/ytl-task-archive-digabi2-dbdata branch from 09879e8 to 196a735 Compare May 13, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants