Creating automatic Backup and Shrink script

Moderator: leecollings

Post Reply
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Creating automatic Backup and Shrink script

Post by njlammerts »

Afer my problems with Enever Energy Option and Token problems (wich resulted in faiiing Pi/Domoticz) https://www.domoticz.com/forum/viewtopic.php?t=42127 , i have been searching for methodes to backup running RPI/Domoticz i found several links and i used the following https://www.reddit.com/r/raspberry_pi/c ... ?rdt=65036 to create a running backup to a mounted NAS share https://raspberrypi-guide.github.io/fil ... rnal-drive .
Now i am able to make a IMG file/backup to remote location and shrink it to smaller format and this shrinked image can be restored to a SD card wich can boot a RPI again.

Now i want to make a automatic script, wich creartes an image once a week and after do a shrink and give the file a date-time stamp. It would be much appreciated to get some help as i dont have the right skills for this.
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Creating automatic Backup and Shrink script

Post by njlammerts »

I already used https://www.domoticz.com/wiki/Daily_bac ... ternal_hdd to make a daily backup of Domoticz DB to external location,
But due to compatibility problems between older versions of Domoticz and version Database I prefer a weekly IMG backup with a daily Domoticz Backup, so I can always go back to an older version Domoticz when needed, such as my crash with Enever Energy Token
Kedi
Posts: 563
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Creating automatic Backup and Shrink script

Post by Kedi »

Logic will get you from A to B. Imagination will take you everywhere.
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Creating automatic Backup and Shrink script

Post by njlammerts »

I Have seen the mentioned link mentioned by KEDI , and I used parts of it. But I do not like incremental backups, if somewhere an initial backup or incremental gets defective or the set is not together, you are screwed.
I used the part to create a mounted network share to create a IMG to. Then I used the shrink utility and this gets the "air" out of the IMG file.
I would like a script that runs automatically and gives the shrink tool a date/time stamp to the saved IMG, so I have a multiple IMG sets.
I would run this one a week or month and can always restore the matching database from the daily backup I have setup.
User avatar
HansieNL
Posts: 960
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Creating automatic Backup and Shrink script

Post by HansieNL »

Blah blah blah
njlammerts
Posts: 139
Joined: Wednesday 12 August 2020 17:13
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Fryslan
Contact:

Re: Creating automatic Backup and Shrink script

Post by njlammerts »

RaspiBackup is new for me, but I wil surely look in to that, thanks for pointing out......
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests