Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
S
server
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1
    • Merge Requests 1
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  • Confidential and Proprietary
  • NYNJA
  • server
  • Merge Requests
  • !302

Closed
Opened Mar 20, 2020 by delete2@delete2Contributor
  • Report abuse
Report abuse

Initial version of db mgmt scripts in nynja_oam app

  • Overview 9
  • Commits 1
  • Changes 7

Created by: uwiger

See issue #301 Based on branch uw-rebar3-otp21-development (pr #299)

Added nynja_oam app to collect O&M utility code.

Three scripts, to be used as extensions to the bin/server start script.

bin/server db_install_fallback FILE

Used to load a mnesia fallback into e.g. a local build. The script starts a clean node (i.e. using -boot start_clean), loads mnesia tables, then installs the fallback. If this goes well, mnesia is stopped and restarted. The tables are loaded, and then the node is shut down.

Since both the original database and the resulting database are loaded completely, running this command may take some time.

bin/server db_snapshot FILE

Used in order to be able to quickly reset the database e.g. between test runs. A clean node is started, mnesia is started and tables are loaded. After this, transaction logs are dumped, mnesia is stopped, and a compressed tar file of the mnesia directory is created.

Since table loading is done, running this command on a large database may take some time.

bin/server db_restore SNAPSHOT

With a snapshot file created using db_snapshot above, a clean node is started, the mnesia directory is deleted and re-created from the snapshot archive. A simple check is done to ensure that the snapshot file is indeed a readable tar file, and that it contains a directory matching the mnesia directory name.

This command is reasonably fast even on a fairly large database.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: exconfidential/nynja/server!302
Source branch: gh301-db-scripts