Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D doc-website
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Systerserver
  • doc-website
  • Wiki
  • Sysadmin tasks

Sysadmin tasks · Changes

Page history
Update Sysadmin tasks authored Sep 24, 2021 by Mara Karagianni's avatar Mara Karagianni
Hide whitespace changes
Inline Side-by-side
Sysadmin-tasks.md
View page @ 2b7c9e43
## Sysadmins emails should be added in /etc/aliases ## Sysadmins emails should be added in /etc/aliases
``` ```
vi /etc/aliases # vi /etc/aliases
root: admin1@domain.net, admin2@domain.net, admin3@domain.net root: admin1@domain.net, admin2@domain.net, admin3@domain.net
``` ```
**WHY:** **WHY:**
The server sends emails for the security updates* that have been installed overnight and inform the sysadmins if a reboot is necessary. The server sends emails for the security updates* that have been installed overnight and inform the sysadmins if a reboot is necessary.
* Requires that we have enabled unattended updates **REQUIRES:**
that we have enabled unattended updates, see how-to:
https://wiki.debian.org/UnattendedUpgrades
**OPTIONAL:** **OPTIONAL:**
In order to receive the latest Debian security advisories, subscribe to the [debian-security-announce](https://lists.debian.org/debian-security-announce/) mailing list. In order to receive the latest Debian security advisories, subscribe to the [debian-security-announce](https://lists.debian.org/debian-security-announce/) mailing list.
## Server reboot ## Server reboot
`shutdown -r +2 ` List and save all services currently running in a file with a timestamp in the name, before and after the reboot:
# the flag +m will execute the shutdown after 2min. Handy to make sure users can logout before shutting down. ```
# the flag -r is for reboot # systemctl list-units --type=service --state=running > DD-MM-YY-beforeboot
alternatives: ```
ref: https://linuxhint.com/list-all-running-services-debian/
```
# shutdown -r +2
```
* the flag -r is for reboot
* the flag +m will execute the shutdown after 2min. Handy to make sure users can logout before shutting down
When server is back again, save the list of services and check for differences
```
# systemctl list-units --type=service --state=running > DD-MM-YY-aftereboot
# diff service-<timestamp>-beboreboot DD-MM-YY-afterboot > diff-services
# less diff-services
```
**ALTERNATIVES:**
```
systemctl reboot systemctl reboot
We didn't find a flag to add specific time, so we opted for the above. ```
\ No newline at end of file We didn't find a flag to add specific time of the reboot execution, so we opted for the `shutdown` command to make sure that we have time to finish any pending tasks we run and to exit the server.
\ No newline at end of file
Clone repository
  • Container Backups with Restic
  • Mailing Lists Docs
  • Sysadmin tasks
  • Home