Github Backups
To fulfill auditing requirements, this repository must have a backup on an internal service. This is accomplished in two ways - first, a pull mirror is setup from Github to gitlab.software.inl.gov, which updates the source code of all branches whenever pushes are made. In addition to this, a cron script is run every two weeks on Friday to manually retrieve all issues and pull requests and copy them into an internal backup csv file. This is a full backup each time, not an incremental backup. This is necessary because repository mirroring between Github and Gitlab does NOT retrieve issues and PRs, due to them being implemented slightly differently between the two services.
The issues/PRs backup is accomplished by hitting the Github API for a JSON file of the issues, using internal Python tools to parse the JSON into a dictionary, then dumping the dictionary into a csv file. Backups are maintained for at least two years, after which, older backups may be removed at any time to free up disk space. These backups can be located on any HPC machine inside of /home/mooseadmin/auditingbackups/(repository name). If the backup is ever needed for a restore on GitHub, the csv can be imported using the Github CSV Tools, available here. If, for whatever reason, the issues need to be introduced to Gitlab, this can be accomplished by simply renaming the 'body' header in the csv to 'description' (the script can similarly be altered to save the csv in the Gitlab format by replacing it in there as well). We strongly recommend against using the built-in Gitlab issue importer, as it will not be able to import anything from the Github version of the repository except the title and description of the issue, as well as losing every pull request, as Github considers all pull requests to be issues, but Gitlab views them as a separate data structure.