python / psf-salt

PSF infrastructure configuration
MIT License
114 stars 57 forks source link

hg: Add static files to salt backup state #440

Closed JacobCoffee closed 2 months ago

JacobCoffee commented 2 months ago

What

  1. Add /usr/share/mercurial/templates/static/ to pillar/prod/backup/hg.sls.
  2. We need to think about host migration instructions, because we rsync, but the parent directories will not exist unless the mercurial package is installed

Why

These files arent covered in the backup of /srv, and I would think the mercurial package that sets all that /usr/share/... stuff would contain these, but it either is buggy or doesnt anymore or never did.

We can just add that one static dir though, and apply the files with a requires: - pkg: mercurial so that the /usr/share/mercurial/templates/ exists.

This fixed it, but we probably need to back up this in salt?

coffee@hg:~$ sudo -E rsync -av -e "ssh -i /home/psf-users/coffee/.ssh/id_ed25519" --rsync-path="sudo rsync" coffee@10.132.127.204:/usr/share/mercurial/templates/static/ /usr/share/mercurial/templates/static

created directory /usr/share/mercurial/templates/static
./
background.png
coal-file.png
coal-folder.png
feed-icon-14x14.png
followlines.js
hgicon.png
hglogo.png
mercurial.js
style-extra-coal.css
style-gitweb.css
style-monoblue.css
style-paper.css
style.css

sent 274 bytes  received 65,209 bytes  26,193.20 bytes/sec
total size is 64,344  speedup is 0.9

Image

Originally posted by @JacobCoffee in #414