Hello Guix! The attached patch adds backup and restore mechanisms to the PostgreSQL Shepherd service. It looks like this (here with a db named 'mreg'): $ sudo herd backup postgres mreg $ sudo -u postgres psql -c 'drop database mreg' # whoops ... DROP DATABASE $ sudo herd list-backups postgres mreg mreg@2022-06-16_21-55-07 mreg@2022-06-16_22-48-59 $ sudo herd restore postgres mreg@2022-06-16_22-48-59 $ sudo -u postgres psql mreg mreg=# Pretty cool, no? :-) The restore command is "smart": if the database already exists, it restores in a single transaction; otherwise, it will be created from scratch (these scenarios require mutually exclusive options to 'pg_restore'). With this patch you can 'herd backup' each database, stop postgres, _delete_ /var/lib/postgresql/data, reconfigure with a newer version, and 'herd restore' them again -- but you'll lose any role passwords (and roles not declared by postgresql-role-service-type). Not sure what to about roles, maybe a backup-roles command? There is no Scheme API yet, but it would be nice to define per-database settings (i.e. --jobs or --format) in the configuration. And also a scheduled backup service. These tasks are up for grabs. :-) The quest here is to provide a smooth upgrade path for end users (and eventually bump the old 'postgresql-10' service default). Feedback and/or testing welcome!