When doing my first steps, I’m subject to make many mistakes…
By accident, I created two identical tables of account (“minimaler Kostenplan”), and used both of them randomly.
Now I need to get rid of the surplus one, but it’s already in use by an invoice. Is there any chance to get delete that invoice ? - Or a trick to “force delete” a table of accounts with all its children?
Is there an “experimental” mode for noobs, where the normal data storage rules in accounting are disabled, so noobs can experiment without fatal consequences?
I don’t think that’s really realistic. I cannot belive anybody can dive into tryton without making severe mistakes in the very beginning and early stages. A complete startover each time will soon leave noobs frustrated and disappointed. Think only how many tries a noob needs until his invoice template really fits… (for myself I expect several months of parallel usage of tryton and the old system till I really know how to handle tryton.)
I think tryton should have the chance to begin with an “experimental version” where mistakes can be corrected. That could have a red-coloured background and a huge warning “not for productive use - test only” or so. Finest would be if I could at a certain point copy the testing database to productive and keep the testing one for further experiments.
It is not up to the software to organize your work. Do your homework and don’t blame software.
You may get inspired by the Tryton hosting I provide, it runs (at least) 3 independent tryton services.
One for production, one for testing and one for training.
An additional panel allows to save/restore/clone/move databases between these three services.
A “tachy-backup” mode with a database backup every hour or every quarter is available to help you restore the state before.
test and training services must be maintained over time, because test allows to validate new modules and upgrades before they hit the production service and training is always needed to rehearse unusual
operations and to train a new employee.
Hope this helps.
You can backup the database at any time you like, then restore it to go back to that point in time.
This means that you can create a database backup before you start doing an experiment, then if you find that the experiment didn’t work out as expected you can just restore the database and you will be back to the point just before you started your experiment.
Another alternative would be to have a testing system and a production one, you could copy the production database to the testing one, run the tests to see what will happen, then if you are happy perform the same actions on your production system.
Thank you.
As you may have noticed: I’m not at all a pro, just an entrepreneur looking for a tool to do the not-at-all-fun-part of the work. I never worked with docker, and I dont have the time to dig into the details. So could you please let me know how I can access the database and where it lives?
Are you using docker now? If so the database will be stored inside your postgres container. You can find the ID for the container by running:
sudo docker ps
Once you know the ID you can run the commands suggested by @SISalp in the container by doing something like this: (remember to change the [container_id] for the one you previously found)
More information on postgres backup and restore can be found in their documentation.
If you are not using docker then you should be able to use the commands above without the “sudo docker exec [container_id]” part, although the user name and database name may be different.
These are not error messages, they are just a list of all the things that are getting restored to the database.
If you have a look in the backup file, there should be a line near the top that says something like DROP DATABASE tryton;. If the backup file contains this (which it should do if you ran the pg_dump command with the -C flag) then you can be pretty sure that any changes that you made to the database will have been removed.
So, make sure the tryton server is restarted (which it will be if you do the commands you listed before), and the client as it may be caching some of the data. To restart the web client use the reload button in the toolbar of your browser.