Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backup CLI command #571

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Add backup CLI command #571

merged 1 commit into from
Nov 5, 2023

Conversation

sissbruecker
Copy link
Owner

@sissbruecker sissbruecker commented Nov 5, 2023

Adds a CLI command that allows to create a backup copy of the SQLite database within the Docker container. The file can then be moved to the host system using docker cp.

Closes #454

@sissbruecker sissbruecker merged commit 6c7ce91 into master Nov 5, 2023
2 checks passed
@sissbruecker sissbruecker deleted the feat/backup-command branch November 5, 2023 18:27
@fs111
Copy link
Contributor

fs111 commented Nov 24, 2023

I don't quite understand this feature. Are you not mounting a host directory inside the container to keep the db safe? I am currently simply copying the file in a cron job and that just works. Am I missing something?

@sissbruecker
Copy link
Owner Author

Technically the copy approach is not safe: https://www.sqlite.org/howtocorrupt.html

Thus an explicit command for creating a backup.

@fs111
Copy link
Contributor

fs111 commented Nov 24, 2023

fair enough. My little linkding has so little traffic that I assume it is safe to do. There is no active transaction and if the file is corrupt I get a fresh one 4 hours later.

@sissbruecker
Copy link
Owner Author

Yes, I would also assume there is an extremely low risk for the linkding use-case. But for an official recommendation for backups I'd rather go the safe route.

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.

Make backups easier
2 participants