Setting up cron job for running MX Snapshot?  [Solved]

Message
Author
tone2
Posts: 96
Joined: Tue Jul 07, 2020 9:34 pm

Setting up cron job for running MX Snapshot?

#1 Post by tone2 »

Hi,

Is it possible to automate MX snapshot with a Cron task/BASH script so the OS will periodically create a Snapshot and delete the old snapshot when done?

Thanks in advance,

Rob

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: Setting up cron job for running MX Snapshot?

#2 Post by anticapitalista »

I don't think so since snapshot requires user intervention.
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
Eadwine Rose
Administrator
Posts: 11968
Joined: Wed Jul 12, 2006 2:10 am

Re: Setting up cron job for running MX Snapshot?

#3 Post by Eadwine Rose »

If it were possible you don't want it to remove the old one. If you happen to break something right before the snapshot is made you won't have the old one anymore.
MX-23.2_x64 July 31 2023 * 6.1.0-20-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

tone2
Posts: 96
Joined: Tue Jul 07, 2020 9:34 pm

Re: Setting up cron job for running MX Snapshot?

#4 Post by tone2 »

Hi and thanks for the replies,

@anticapitalista So there's no way to run MX snapshot through the terminal? It has to be run as GUI?

@Eadwine Rose That's true, however I was thinking it wouldn't delete until after the new snapshot had finished being created.

Thanks again,

Rob

User avatar
oops
Posts: 1620
Joined: Tue Apr 10, 2018 5:07 pm

Re: Setting up cron job for running MX Snapshot?  [Solved]

#5 Post by oops »

... You can use Timeshift instead, it is more adapted for your requested tasks.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: Setting up cron job for running MX Snapshot?

#6 Post by anticapitalista »

tone2 wrote: Mon Nov 22, 2021 6:14 pm Hi and thanks for the replies, ...

@anticapitalista So there's no way to run MX snapshot through the terminal? It has to be run as GUI?

Rob
Correct.
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

tone2
Posts: 96
Joined: Tue Jul 07, 2020 9:34 pm

Re: Setting up cron job for running MX Snapshot?

#7 Post by tone2 »

oops wrote: Mon Nov 22, 2021 6:18 pm ... You can use Timeshift instead, it is more adapted for your requested tasks.
Thanks, I'll give it a go.

User avatar
Adrian
Developer
Posts: 8269
Joined: Wed Jul 12, 2006 1:42 am

Re: Setting up cron job for running MX Snapshot?

#8 Post by Adrian »

anticapitalista wrote: Mon Nov 22, 2021 7:41 am I don't think so since snapshot requires user intervention.
Now you can run snapshot with -c (--cli option) and it could potentially be used in scripts, but it's a long process and you might run out of space or whatever so I don't really recommend running it from a script.

tone2
Posts: 96
Joined: Tue Jul 07, 2020 9:34 pm

Re: Setting up cron job for running MX Snapshot?

#9 Post by tone2 »

Adrian wrote: Mon Nov 22, 2021 9:01 pm
anticapitalista wrote: Mon Nov 22, 2021 7:41 am I don't think so since snapshot requires user intervention.
Now you can run snapshot with -c (--cli option) and it could potentially be used in scripts, but it's a long process and you might run out of space or whatever so I don't really recommend running it from a script.
Judging by the responses I think it's ill advised, so I'll stick to the prescribed modes lol. But I am curious, what is the '--cli' option? Just as a theory exercise, the concept of not having a GUI interests me.

User avatar
Adrian
Developer
Posts: 8269
Joined: Wed Jul 12, 2006 1:42 am

Re: Setting up cron job for running MX Snapshot?

#10 Post by Adrian »

Give it a try :) or do a "mx-snapshot --help" for more info...

Post Reply

Return to “General”