alchemydumps | SQLAlchemy backup/dump tool for Flask | Continuous Backup library
kandi X-RAY | alchemydumps Summary
kandi X-RAY | alchemydumps Summary
Do you use Flask with SQLAlchemy? Wow, what a coincidence!. This package lets you backup and restore all your data using SQLAlchemy dumps() method. It is an easy way (one single command, I mean it) to save all the data stored in your database. You can save it locally or in a remote server via FTP. WARNING @baumatron've found an important bug: at this time this package won't backup non-standard mappings, such as many-to-many association tables. This is still an open issue and I have no expectation to fix is in the following weeks — pull requests are more tham welcomed.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Manage backups
- Yield all files that match the given timestamp
- Extract timestamp from a file name
- Get timestamps
- Restore the data from the database
- Get all mapped models
- Add subclasses of a model
- Return the name of the file
- Run the filter
- Returns the length of the last month
- Returns the length of the last year
- Filter dates according to the given period
- Connect to FTP server
- Change ftp
- Delete files
- Check if a file is valid
- Create backup files
- Returns a dictionary of mapped mappings
- Show list of backups
alchemydumps Key Features
alchemydumps Examples and Code Snippets
Community Discussions
Trending Discussions on alchemydumps
QUESTION
I am trying to backup a database through sqlachemy and save it as a file. I tried using the extension, Flask-AlchemyDumps, but it appears to no longer be supported.
I musted be missing something obvious as this is surly an action a lot of developers want to do. Does anyone know how I should be backing up the database?
Thanks in advance
J Kirkman
...ANSWER
Answered 2019-Jul-11 at 15:10SQLAlchemy is an ORM which sits between your code and the database. It's useful if you want to interact with specific rows and relationships without having to keep track of lots of ids and joins.
What you're looking for is a way to dump the entire contents of your DB to disk, presumably so you can restore it later/elsewhere. This is a bulk action, which is your first clue that an ORM may not be a suitable tool. (ORMs tend to be fast enough for small to medium operations, but slow and not ideal for actions which affect 10s of 1000s of rows at once.) And indeed, this isn't usually something you'd use an ORM for, it's a feature of your DB, presumably Postgres or MySQL. If you happen to be using Heroku, you can use their command line tool to do this.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install alchemydumps
The second line imports the object from the package.
The last line instantiates AlchemyDumps for your app and database.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page