Backup your latte configs with a service

I noticed a few more config wiping issues for latte dock, and I thought I’d share what I did to create backups since I’m a noob at making systemd services, and I figure this is where folks will search for a solution to that issue as well. No amount of someone simply saying “make a backup” is going to help me given how busy I am, so I took some initiative on behalf of other users to do this and document my process.

I wrote a script to backup to my smb share that I mounted in /etc/fstab bounced back and forth between these two tutorials to run that script on a schedule:

I have a directory where i keep my scripts in my home directory, you probably keep them somewhere different, be mindful of that as you read through.

~/scripts/ :


DATE=`date '+%Y%m%d-%H%M%S'`


~/.config/systemd/user/backup.service :


ExecStart=/bin/bash /home/meredith/scripts/

~/.config/systemd/user/[email protected] :

Description=Send email

ExecStart=sh -c 'systemctl --user status %i | \
mailx -s "[SYSTEMD %i] Fail" meredith'

~/.config/systemd/user/backup.timer :

Description="Automatically run backups"



Then in konsole, test it and enable if it works:

systemctl --user start backup.service
systemctl --user enable backup.timer

if it doesn’t work, journalctl --user-unit=backup.service.

I hope this saves some users time and effort! Thank you for your help with this issue.


I appreciate the initiative and so I am commenting to support that friendly effort. I hope you find lots of support. Thank you again.

1 Like

You may configure the service to start after connecting to the network and mounting a fileshare if you wish. Find the name of the fileshare:

systemctl list-units --type=mount

and you should see something like mnt-foobar.mount. Add that to your service:

Description=Automatic backup service mnt-foobar.mount

For me, this was causing failures because it wasn't waiting for that mount. I had a VPN configured to autoconnect on login with another service, and it blocked my backup because it couldn't access my cifs volume. Now to hunt it down and make it load only after my backup service has run.


After I migrated to a new hard drive and decided it was pretty clunky to copy all my services and scripts over to the new machine, I decided just to create a repo with a backup service. Here it is for those interested. I’ve omitted the notify via email service because that takes some effort to set up, and I’m not about that when I can just periodically look at my backups directory to see what’s been backed up lately.

Open to feedback and pull requests.


No more latte, I see… :wink:
It was a tug at the heartstring to reread that name in the title…

Yeah, she was nice to us while she was around. :headstone:

This is a general backup script so maybe it deserves its own topic?