I’ve recently been trying to containerize as much as I can to make my self-hosted system portable by simply backing up my docker data folder.

One thing I’m struggling with is whether or not to containerize a few system crons that I use for maintenance (for example, using wget to update some files, and using chmod to make sure my file permissions remain on point).

What I’d like to avoid is having to manually backup my crontab. Maybe I’m overthinking it, but any advice one way or another? Should I bother? Any disadvantages? Any docker image folks would recommend aside from a base alpine image?

  • thekrautboy@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    It probably makes more sense to invest time to learn things like Ansible (and Sephamore if you want a webui) to script such basic things.

    Other than that, maybe Cronicle or Crontab-ui could be useful.

  • p_235615@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    I mean its 1 command to store your user crontab and 1 to restore it, so I would not over complicate it…

    backup:

    crontab -l -u root > /tmp/your-crontab-backup

    and restore:

    crontab /tmp/your-crontab-backup

  • Minituff@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    I actually Containerized one of my CRON jobs that used rsync to copy my container volumes to my TrueNAS server (link).

    I think it’s a good idea and you’ll learn a lot along the way. Plus if you open source it then it will be way easier for people to get it up and running.