Delete invoice, table of accounts etc

Yes, when restoring you don’t need to specify the database (leave off the -d tryton part). This is stopping that database from being dropped.


So just to recap I’ve just tried a slightly simplified full process from the start:

  1. Create your Tryton docker system:

    $ sudo docker run --name tryton-postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=tryton -d postgres
    $ sudo docker run --link tryton-postgres:postgres -e DB_PASSWORD=mysecretpassword -it tryton/tryton trytond-admin -d tryton --all
    "admin" email for "tryton": admin@example.com
    "admin" password for "tryton": 
    "admin" password confirmation: 
    $ sudo  docker run --name tryton -p 8000:8000 --link tryton-postgres:postgres -e DB_PASSWORD=mysecretpassword -d tryton/tryton
    
  2. Connect to http://localhost:8000 in your browser, or with the desktop client, login and use Tryton.

  3. Make a backup (you shouldn’t really need to stop and start tryton here):

    $ sudo docker stop tryton
    $ sudo docker exec tryton-postgres pg_dump -C -c -U postgres -O tryton >tryton-backup.sql
    $ sudo docker start tryton
    
  4. Connect to http://localhost:8000 in your browser, or with the desktop client, login and use Tryton. Create records, activate modules, etc…

  5. Restore the system back to the point where the backup was made:

    $ sudo docker stop tryton
    $ sudo docker restart tryton-postgres
    $ sudo docker exec -i tryton-postgres psql -U postgres <tryton-backup.sql
    $ sudo docker start tryton
    
  6. Connect to http://localhost:8000 in your browser, or with the desktop client, login and use Tryton as it was at the point of the backup.