Tiny Core Base > TCB Q&A Forum

Reboot with "backup" causes error if .filetool.lst is empty - but it shouldn't?

<< < (2/5) > >>

maro:
I guess what might be helpful here (without changing the current functionality) would be an additional check of the /opt/.filetool.lst file after line 94 in /usr/bin/filetool.sh.

Something along the lines of:

--- Code: ---  if [ $1 == "backup" ] ; then
    sed -i /^$/d /opt/.filetool.lst
+  if [ -s /opt/.filetool.lst]; then
     if [ -z $2 ]; then

--- End code ---
and

--- Code: ---        [ -s /tmp/backup_status ] && exit 1
      fi
+   else
+     echo -N "Nothing to backup due to empty /opt/.filetool.lst"
+   fi
    if [ -f /etc/sysconfig/bfe ]; then

--- End code ---

Please note this is not a patch, but rather an (yet) untested idea.

roberts:
It is not difficult to implement. But the idea of a user finding a hidden system file to delete its contents for the purpose of deleting their existing backup seems extraordinary. Perhaps a restatement of purpose is in order. Instead of trying to state what should be done, state the intended purpose. The goal. We already provided an option to not to default to doing a backup.

My interpretation was an expectation of an empty list should make an empty tar archive so that no restore would happen upon reboot and therefore the deleted item would not return. Which is quite different from just checking for an empty list.

The "skip_backup" boot option is "norestore", perhaps that is what is needed to be specified?
That way, when using persistent home & opt, an occasional backup could be performed and restore would only happen on demand, e.g., when norestore boot option is not specified.

mikshaw:
My interpretation is that automatically deleting ANYTHING other than temp files is a bad thing.  Making assumptions about what the user wants should be done as little as possible.

Jason W:
An empty .filetool.lst makes no sense, as it should at least back itself up.

And of course, it should always be assumed that /opt/.filetool.lst should contain at the very minimum "opt/filetool.lst" to back itself up to be available next boot.

Having only opt/filetool.lst listed in opt/filetool.lst would achieve what the original poster seems to want: to make an empty backup that overwrites the old backup instead of manually deleting mydata.tgz.

roberts:
I will revisit this area for v2.9 with the possibilty of additional GUIs to help manage the two files .filetool.st and .xfiletool.lst  that control backup and restore. I will also port over my tiny GUI to support selective restores.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version