Server-Utils/mastodon/pg_backup_monthly.service

9 lines
226 B
INI

[Unit]
Description=Backup postgres database mastodon_production (monthly)
[Service]
Type=oneshot
User=mastodon
Group=mastodon
ExecStart=/bin/bash -c "mv $(ls -rt /home/mastodon/.bu/*.sql|tail -1) /home/mastodon/.bu/monthly/"