WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Idea for exittc (shutdown program) - add in checkbox to show backup status  (Read 5946 times)

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
If you do a backup while shutting down Tiny Core, the backup seems to take forever because there is no indication of what is going on.   From a user perspective standpoint, I think the backup at shutdown seems to go faster if you can see a list of files that are being backed up.   Plus, if you can see the list of files being backed up, you can easily identify large files that are slowing down the backup. 

I have made some minor modifications to exittc.fl so that there is a checkbox that the user can select if they would like a terminal to pop open during the backup at shutdown so that they can watch the progress.   

The updated exittc.fl is attached to this message.

Thanks,
Brian

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Would it be easy to have such a feature for backup even when not done upon shutdown?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
Would it be easy to have such a feature for backup even when not done upon shutdown?

Yes it would.   If this is something that would be accepted, I can update the filetool app to also include a check box that would pop open a terminal to display the backup/restore status.   

Brian

Offline TaoTePuh

  • Full Member
  • ***
  • Posts: 172

Quote
Plus, if you can see the list of files being backed up, you can easily identify large files that are slowing down the backup.

To get a list of files in your backup sorted by size this can perhaps be helpful :

Code: [Select]
tar tvzf $(cat /opt/.tce_dir)/mydata.tgz | sort -n +2 -3

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Code: [Select]
tar: can't open '/tmp/tce/mydata.tgz': No such file or directory
I think that would be defining location of backup by location of extensions which in default mode (as here the case) is /tmp/tce/
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
IMHO doing a list upon exit is too late. Doing it while attempting a backup is too late.
Reviewing an existing mydata.tgz is too late. This topic has been discussed much since I first created these scripts in 2003.

Typically, it is in HOME that files accumulate that you may not be aware that will cause an attempted backup to either take very long to complete or possibly even fail.

To see large files residing in your home you can use:
find /home/tc/ -type f -size +1M | xargs ls -lhS

I will add a tab to system stats to report big files.
10+ Years Contributing to Linux Open Source Projects.

Offline TaoTePuh

  • Full Member
  • ***
  • Posts: 172
@tinypoodle

Okay, I have seen in filetool.sh that you must run some effort to determine (universally valid) the path to mydata.tgz. No chance for me to formulate this as a one-liner.

So I make myself easy, and correct me like this :

Code: [Select]
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -n +2 -3
 ;D ;D ;D

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857

To see large files residing in your home you can use:
find /home/tc/ -type f -size +1M | xargs ls -lhS
Code: [Select]
tc@box:~$ find /home/tc/ -type f -size +1M | xargs ls -lhS
find: invalid number '1M'
Replacing '1M' by '1024k' appears to work.  ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
Would it be easy to have such a feature for backup even when not done upon shutdown?

Attached is an updated filetool.fl that includes an optional check box that will pop open a terminal that will show you the backup/restore status.  

I also had to make a minor change to filetool.sh (also attached) because currently it isn't possible to specify a backup/restore device without also implying the "noprompt" option.  

Brian

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857

Code: [Select]
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -n +2 -3
Code: [Select]
tc@box:~$ tar tvzf /mnt/sda5/mydata.tgz | sort -n +2 -3
sort: invalid option -- '3'
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
@tinypoodle

Okay, I have seen in filetool.sh that you must run some effort to determine (universally valid) the path to mydata.tgz. No chance for me to formulate this as a one-liner.

So I make myself easy, and correct me like this :

Code: [Select]
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -n +2 -3
 ;D ;D ;D


There is also this:   http://forum.tinycorelinux.net/index.php?topic=6979.0     It will show you the uncompressed size of your backup and what percentage each file in your backup is of the overall backup size. 

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
IMHO doing a list upon exit is too late. Doing it while attempting a backup is too late.
Reviewing an existing mydata.tgz is too late. This topic has been discussed much since I first created these scripts in 2003.

I agree with you that it is too late upon shutdown to list your files in order to determine if you are backing up too much or incorrect files.    In my case, I know what is in my backup and it all needs to be there.   However, when I shutdown my computer the backup seems like it takes forever just because there is no visual indication that anything is happening.    For me, seeing the list of files being backed up on the screen changes the perception of how long the backup takes because I can see the status and progress. 

Thanks,
Brian

Offline TaoTePuh

  • Full Member
  • ***
  • Posts: 172
@tinypoodle

Quote
tc@box:~$ tar tvzf /mnt/sda5/mydata.tgz | sort -n +2 -3
sort: invalid option -- '3'

I suspect here a restriction by the "busybox sort".

A "tce-load -i coreutils" in front of the command should fix this ...


EDIT, to love of completeness, so it works with the "busybox sort" and the "corutils sort"

Code: [Select]
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -k 3n,4
« Last Edit: August 22, 2010, 04:18:03 PM by TaoTePuh »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
That works, thanks.  ;D
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Quote
currently it isn't possible to specify a backup/restore device without also implying the "noprompt" option.

Hmmmm, works as expected displaying the files with a prompt at completion;
 filetool.sh backup "" sda1/tce
10+ Years Contributing to Linux Open Source Projects.