As we twiddle and make config changes

...remember to grab the SD card from your repeater/gateway every few months and create an image backup file.

I have just taken an image of my repeater to the PC and am now looking for some external storage to save the file to for the longer term.

Then I wonder...do I really need a 32GB SD card and corresponding image file.

I have used Pi-Shrink to compress but it is a faff.

Why not just use rsync and do it across your network in automation.
Cron is a fair tool used as intended.

Just a thought for simplicity. No need to remember.

Mike, more info please.

I have worked in IT for many years and every company I have worked in has had a good backup policy. Be it raw data, the OS, the OS plus data or the bare metal approach. Not one company implemented a good restore policy. When the S word hit the fan, those backups were on par with a Chocolate Teapot.

I just restored my backup to a new SD card. Fitted it and rebooted. 3 Mins of downtime.

Just saying :wink:

There's different ways to do it. For example, I use the tool rclone to synchronize things like /etc/asterisk and others to various data locations. I mostly have consolidated to S3-based buckets and/or Backblaze B2.

This stuff is built into the OS so no complicated installs.

But it does depend on what you want to back-up.
At a minimum, I would backup all .conf files in /etc/asterisk
Not much data there at all.
How many times a week do you edit your files... if more than 2, daily would be best for that. Small files so you can keep a dated monthly log rotation.
Sometimes we fat finger things and don't realize it for a while.

rsync is in your os as a external command.
it's in the MAN pages
man rsync
cron is the system scheduler

Schedule the rsync command with options.

You may have a little network setup to config depending on where you back them up to externally. But anywhere intranet or internet is that limit as well as a mounted USB drive..

Google those 2 words, one at a time for proper usage and perhaps other ideas on more complex actions..
We have been through this many times on the board and everybody has their favorite tools and methods they will soon inject, so I'm not typing a tutorial here that you may never use.
But I will say if you have a terrible learning curve for command line option stuff, you might not like it. You should at least explore it.

Personally, I just like powerful, thin and simple. And built-in is always a plus.
I run several web servers that I use this to backup different types of data at different intervals in different places. All automated in cron. Made my life a lot easier.

But you do need to verify/check any backup once in a while to make sure it's valid.
Boy, could I tell you lessons I have learned on that. Long ago in the past but strong enough to never forget.

But you gotta pick something to use that you are comfortable with and understand.
And make sure you understand how to restore as well in whatever format used.

Mike,

Thanks for the info. I now have a script that uses rsync to take a copy of various .sh and .conf file files and store these on a share on a Windows (cough) pc.

I am familiar with cron and probably make more changes to that than any config files or scripts.

Therefore rsync is also backing up /var/spool/cron and everything below.

Tom.

FB Tom,
Just a last note...
Be sure to explore the option to retain ownership and permissions of files.
I normally write it all in a bash shell script and just call that so I can do it manually when I need to. (before big changes and updates)

An enhancement to plain sync is rsnapshot. It’s easily installed.

Rsnapshot uses sync and symbolic links to create and maintain a multi-level or multi-location backup of a machine. I use to back up the various Pi-like devices I have around the place.