Updating and backups
Pull a new version safely and keep backups.
Updates arrive as a new version of the app. Most of the time it’s a pull, a migrate and a build. Migrations never overwrite your settings, prices or catalogue. They only add new fields and new defaults that don’t exist yet.
Update the app#
- Take a backup first.
bench --site <site> backup --with-files - Get the new version.
cd apps/roomoverroo && git pull && cd ../..(or copy in the new app folder). - Migrate.
bench --site <site> migrateadds any new fields and settings. - Build the screens.
bench build --app roomoverroopublishes the new app screens. Thenbench restart. - Check. Open
/rooand do a test quote at/roo/book.
Backups#
Frappe takes automatic backups if they’re switched on in System Settings. For a business that takes deposits, keep at least daily backups with files, and copy them off the server. You can also download them from Desk under Backups.
bench --site <site> backup --with-files
# restore onto a site
bench --site <site> restore <database.sql.gz> --with-public-files <files.tar> --with-private-files <private-files.tar>
Changing the screens yourself#
The app’s screens are a Vue 3 project in the frontend folder of the app. After changing them, build and publish:
cd apps/roomoverroo/frontend
npm install
npm run build
cd ../../..
bench build --app roomoverroo
The pricing engine has its own tests that run without Frappe: python3 tests/test_engine.py.