[Timeshift] How to check if backup is currently running (from console)

Hello,
i could not manage to find a way to check if Timeshift is currently running a backup in the background!

I would like to have like a “one-line-command” for console to check if there is currently a backup going on.

My background is, that i want to create a icon changing its color and to be notified if a backup started while using awesomeWM

A solution would be something like
systemctl --type=service | grep timeshift

  • I know timeshift is ran via cron
  • To trigger “timeshift” commands from console i need sudo → Not possible

Maybe someone does have a solution for me.

I dont know if
systemctl status cronie.service
gives some information about currently running updates

Thanks a lot

What about… :arrow_down:

ps aux | grep timeshift | grep -v grep

…?

Perfect thanks!

From there on i can proceed!

The final solution for me is
ps aux | grep rsync | grep -v grep

Because

  1. timeshift starts rsync if running
  2. grep starts also a process wich then finds itsself because “rsync” is in the description of the grep process

Now if rsync is running, this line does NOT return NOTHING “”

1 Like

My mistake… Yes, I know that timeshift uses rsync, and I was in doubt about whether timeshift itself would also have a process in the list when run from a cron job. :wink:

Fair is fair, the solution goes to you. :wink:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.