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

Replace File::copy with SQLite .backup for Transactionally Safe Backups #748

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

muco-rolle
Copy link

Based on the article from Litestream, which advises against using the cp command for SQLite database backups and recommends the .backup command or the VACUUM INTO statement.

This PR removes the File::copy method and replaces it with .backup for a safer and transactionally consistent backup process.

@muco-rolle muco-rolle changed the title refactor: use the sqlite3 .backup command for performing database bac… Replace File::copy with SQLite .backup for Transactionally Safe Backups Dec 16, 2024
package.json Outdated
Comment on lines 21 to 22
}
},
"packageManager": "[email protected]+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this committed in error?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this was committed by mistake. I have removed it now.

rector.php Outdated
Comment on lines 10 to 14
__DIR__.'/app',
__DIR__.'/bootstrap/app.php',
__DIR__.'/config',
__DIR__.'/database',
__DIR__.'/public',
__DIR__ . '/app',
__DIR__ . '/bootstrap/app.php',
__DIR__ . '/config',
__DIR__ . '/database',
__DIR__ . '/public',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Keep changes relevant to the focus of the PR.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, I think this was added by my editor's formatter. Let me know if it's fine now.

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