Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: ixbrian on August 21, 2010, 11:17:02 PM
-
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
-
Would it be easy to have such a feature for backup even when not done upon shutdown?
-
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
-
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 :
tar tvzf $(cat /opt/.tce_dir)/mydata.tgz | sort -n +2 -3
-
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/
-
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.
-
@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 :
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -n +2 -3
;D ;D ;D
-
To see large files residing in your home you can use:
find /home/tc/ -type f -size +1M | xargs ls -lhS
tc@box:~$ find /home/tc/ -type f -size +1M | xargs ls -lhS
find: invalid number '1M'
Replacing '1M' by '1024k' appears to work. ;)
-
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
-
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -n +2 -3
tc@box:~$ tar tvzf /mnt/sda5/mydata.tgz | sort -n +2 -3
sort: invalid option -- '3'
-
@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 :
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.
-
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
-
@tinypoodle
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"
tar tvzf /PATH_TO_YOUR_BACKUP/mydata.tgz | sort -k 3n,4
-
That works, thanks. ;D
-
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
-
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
I didn't think of trying to specify "" as the second argument to filetool.sh; good idea.
Brian