WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Filetool.sh / mydata.tgz / mydatabk.tgz - Auto restore from backup?  (Read 7184 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11695
Re: Filetool.sh / mydata.tgz / mydatabk.tgz - Auto restore from backup?
« Reply #15 on: July 22, 2014, 10:46:57 AM »
Hi onelife
First thing to remember, there is no such thing as failsafe. All you can do is try to make a system as robust as possible and minimize
the windows of opportunity for a failure.
Quote
... but this would mean I need to add the md5 check element to the filetool.sh script right?
Not necessarily. You could call the filetool.sh script from the shutdown script and then generate the MD5 from there.
Quote
... there's still no way of knowing if the filetool.sh process was completed 100%?
The script outputs the word  failed  if it fails.

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: Filetool.sh / mydata.tgz / mydatabk.tgz - Auto restore from backup?
« Reply #16 on: July 22, 2014, 07:21:22 PM »
hi onelife,

filetool.sh writes 2 files to /tmp,  backup_done and backup_status. You need to monitor both of these.

I have found  couple of things that may be of interest.

1. It is possible to have a backup error in backup_status but have an earlier backup_done still present. If I am using a script I delete both files before a backup.
2. The only backup errors I have ever had is a file in filetool.lst that no longer existing or a typo in filetool.lst.
3. If you are using the command line, alternating between using "sudo filetool.sh -b" and "backup" commands may result in the a permission error on backup_done and backup_status files.

regards

Offline onelife

  • Full Member
  • ***
  • Posts: 141
Re: Filetool.sh / mydata.tgz / mydatabk.tgz - Auto restore from backup?
« Reply #17 on: July 23, 2014, 11:19:39 AM »
Hi all,

Not sure if this video will help explain in anyway the "issue".

www.shopbeat.co.za/picore_failed_mydata.swf

Essentially my steps were :

1) run filetool.sh and mid way pull the power OR do ctrl c.

2) Repower or reboot the system

You will see the mydata.tgz that was not completed will extract what it has, but essentially it won't load all settings as any files missed from beyond the power outage / ctrl c point will not be there.

So as I say, I understand that it can't be 100% failsafe, but I do think there's a bigger window of error in the way the filetool.sh process doesn't only move the mydata.tgz file > mydatabk.tgz AFTER creating a valid backup. Perhaps the move from mydata.tgz > mydatabk.tgz should in fact only happen after the new backup has been "sudo" tested?

Again, please don't think I'm being difficult, I'm just keen to try make our system as solid as possible as here in Africa power outages are a very real thing.

FYI, I have about 150 TC systems running and so far this has only happened once but I'm sure eventually it will happen again ;)

Chat soon - Many Thanks!

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Filetool.sh / mydata.tgz / mydatabk.tgz - Auto restore from backup?
« Reply #18 on: July 23, 2014, 11:58:47 AM »
Your suggestion will require more free space in the tce directory because now you need room for 3 copies of the backup.
This introduces another possible cause of failure.

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: Filetool.sh / mydata.tgz / mydatabk.tgz - Auto restore from backup?
« Reply #19 on: July 23, 2014, 06:01:18 PM »
Hi onelife,

You are implying that the data on the SD card is very important. I would not trust a "single" media solution for any critical data, especially a SD card. I would setup one Raspberry Pi as a server (with USD hard drive and backup procedure) and make a second backup there.

regards
« Last Edit: July 23, 2014, 06:12:39 PM by Greg Erskine »