Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: forsik on May 13, 2012, 06:04:11 AM

Title: [Solved] The backup process
Post by: forsik on May 13, 2012, 06:04:11 AM
I run tinycore linux on a weak processor, the backup process long enough

1) Is it possible to speed up the backup process by turning off compression?
2) Can I turn on the display window, the copying process?
Title: Re: The backup process
Post by: Rich on May 13, 2012, 06:17:11 AM
Hi forsik
Do yo have a persistent /home directory?
 
Title: Re: The backup process
Post by: forsik on May 13, 2012, 07:38:27 AM
Hi Rich

Yes, it is stored in the configuration of user (tc) programs and of the folder /home takes less than 1 mb.
Exclusion this folder from .filetool.lst bring more problems than good.
Backup (in internal ssd disk) has a size of about 13 MB, but on my celeron 570 Mhz it can take about 5-15 minutes.
And the boot time is only about 10-20 seconds ...
Title: Re: The backup process
Post by: Rich on May 13, 2012, 08:16:45 AM
Hi forsik
Quote
it can take about 5-15 minutes.
That sounds excessive.
Please post the contents of  .filetool.lst  ,  .xfiletool.lst   , and the output from  fdisk -l (lower case L).
Title: Re: The backup process
Post by: forsik on May 13, 2012, 09:51:11 AM
.filetool.lst
Code: [Select]
opt
home
etc/passwd
etc/group
etc/shadow
etc/gshadow

.xfiletool.lst
Code: [Select]
Cache
cache
.cache
XUL.mfasl
XPC.mfasl
mnt
.adobe/Flash_Player/AssetCache
.macromedia/Flash_Player
.opera/opcache
.opera/cache4
.Xauthority
.wmx

fdisk -l with usb disk
Code: [Select]
sk /dev/sda: 2000 MB, 2000388096 bytes
255 heads, 63 sectors/track, 243 cylinders, total 3907008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00096344

   Device Boot      Start         End      Blocks   Id  System
   /dev/sda1   *          63     3068414     1534176   83  Linux
   /dev/sda2         3068415     3903794      417690   82  Linux swap / Solaris
   
   Disk /dev/sdb: 250.1 GB, 250059292672 bytes
   255 heads, 63 sectors/track, 30401 cylinders, total 488397056 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 512 bytes
   I/O size (minimum/optimal): 512 bytes / 512 bytes
   Disk identifier: 0xc61d86d3
   
      Device Boot      Start         End      Blocks   Id  System
      /dev/sdb1   *          63   488392064   244196001    7  HPFS/NTFS/exFAT
Title: Re: The backup process
Post by: Rich on May 13, 2012, 03:51:00 PM
Hi forsik
Looks like you are booting from a USB thumb drive. If it's USB1.1, having a swap file on it isn't
helping you speed wise. So is sdb1 the SSD drive, and it has 13Mb of data on it?
What is the output from:
Code: [Select]
showbootcodes
du -s /lib
time /bin/tar -czvf file.tgz /lib/* 1>/dev/null
time cp file.tgz /mnt/sda1
Title: Re: The backup process
Post by: gerald_clark on May 13, 2012, 04:37:59 PM
SSD have 4k blocks.
Your sda1 and sda2 are NOT aligned on 4K boundaries.
You will have horrible disk performance.
Title: Re: The backup process
Post by: forsik on May 14, 2012, 12:57:52 AM
Rich,
I do not know how the ssd drive is connected internally, it has a capacity of 2 GB soldered to the motherboard and not replaceable (netbook asus eeepc 701). On it two partition. The first section employs 145 mb, there is installed tc plus, there is stored a backup. The second swap, 531 mb. I have 512 MB of RAM and swap file is almost never used. I created it just in case.
Code: [Select]
$ showbootcodes
initrd=/tce/boot/core.gz quiet waitusb=5:UUID="b602490a-4bfd-4e34-8316-f37b543a6166" tce=UUID="b602490a-4bfd-4e34-8316-f37b543a6166" BOOT_IMAGE=/tce/boot/vmlinuz

$ du -s /lib
6.2M    /lib

$ sudo time /bin/tar -czvf file.tgz /lib/ 1>/dev/null
tar: removing leading '/' from member names
real    0m 31.01s
user    0m 18.46s
sys     0m 0.21s

$ sudo time cp file.tgz /mnt/sda1
real    0m 0.12s
user    0m 0.00s
sys     0m 0.11s


gerald_clark,
If so, how do I fix this without losing the data on the disk?
Title: Re: The backup process
Post by: Rich on May 14, 2012, 08:10:04 AM
Hi lonsoft
Creating a backup of the 6 megabyte /lib directory took 31 seconds, so processor speed does not
appear to be the issue, and copying it to the ssd took no time at all. You can remove those 2 files:
Code: [Select]
sudo rm /mnt/sda1/file.tgz
sudo rm file.tgz
I'd like you to try two more things and post the results:
Code: [Select]
sudo time /bin/tar -czvf /mnt/sda1/file.tgz /lib/ 1>/dev/null
blkid | grep sd
Title: Re: The backup process
Post by: forsik on May 14, 2012, 09:43:55 AM
Rich,

Code: [Select]
$ sudo time /bin/tar -czvf /mnt/sda1/file.tgz /lib/ 1>/dev/null
tar: removing leading '/' from member names
real    0m 19.16s
user    0m 17.84s
sys     0m 0.28s

$ blkid | grep sd
/dev/sda1: UUID="b602490a-4bfd-4e34-8316-f37b543a6166" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda2: TYPE="swap"
Title: Re: The backup process
Post by: gerald_clark on May 14, 2012, 10:36:15 AM
You said you had an SSD, but then said it was built into the motherboard.
You probably have some other type of flash drive, and my SSD comments above may not apply.
Title: Re: The backup process
Post by: forsik on May 14, 2012, 10:45:03 AM
I think the problem is not in the ssd (or other type of flash). This drive is fast enough. Perhaps because of the low productivity of the parameters of the motherboard or processor.

I am now more accurately timed. A backup was created 8 minutes, all this time was 100% CPU load (according to the program and htop conky, a process gzip -f had a load of ~ 99%). Time to boot from pressing the power button to fully loaded (bios, kernel, wifi connetion, dropbear, bftpd, fluxbox, etc.) amounted to 50 seconds.
Title: Re: The backup process
Post by: Rich on May 14, 2012, 11:23:22 AM
Hi forsik
Your hardware is fine. I just re-read one of your other threads, and I know what the problem is:
Quote
sudo mount -t ntfs-3g `blkid -U 6054DA9E54DA766E` /home/ftp
You are also backing up the drive you mounted in your /home directory. Either mount it in /mnt
or add   home/ftp   to your   .xfiletool.lst   file. Then see how long your backup takes.
Title: Re: The backup process
Post by: forsik on May 14, 2012, 11:33:30 AM
No, it's not. I noticed this error at the first backup and reboot, and now I mount usb drive in the directory /ftp. This folder is not included in the backup. (Imagine how long it will take a backup of 250 GB of 600 MHz processor ... on drive with size 2 Gb :D ).

I can simulate the original creation of the backup, but without a reboot, and measure the time?
Title: Re: The backup process
Post by: Rich on May 14, 2012, 11:44:52 AM
Hi forsik
How big is the /mnt/sda1/tce/mydata.tgz file? What does du -S /home/tc give you?
Title: Re: The backup process
Post by: forsik on May 14, 2012, 11:48:24 AM
Rich,

/mnt/sda1/tce/mydata.tgz ~ 19 Mb
du -S /home/tc ~ 47.1 Mb

I think I did not consider nested subdirectories in the directory /home/tc when he said that its size is <1 Mb
Title: Re: The backup process
Post by: Rich on May 14, 2012, 12:03:41 PM
Hi forsik
I think it's due to the size of you backup, your /home directory is 47Mbytes. Those commands I had you
run that timed the tar operation are essentially the same command used by the backup utility. It took
20 seconds to tar and compress one 6Mbyte directory to disk, at that speed, it would take 2 minutes
and 40 seconds to backup 47Mbytes. That is, if time scales linearly with size and regardless of content,
which I don't know that it does.
Title: Re: The backup process
Post by: forsik on May 14, 2012, 12:07:15 PM
I think I almost solved the problem. I deleted from the folder /home directories are not used programs (mozilla, opera 8 etc ...) and the size of the folder /home has decreased to 3 Mb. It looks like browser cache is saved in /home/... Sorry for your time. It remains only to deal with the cache.
Title: Re: The backup process
Post by: Rich on May 14, 2012, 12:13:25 PM
Hi forsik
The .xfiletool.lst list should automatically exclude cache entries. Let us know what the backup time is now.
Title: Re: The backup process
Post by: forsik on May 14, 2012, 12:34:54 PM
Everything is arranged so hard ... Now I realized it was. Now /mnt/sda1/tce/mydata.tgz now takes 2 MB, and the backup takes a few seconds. However there were other problems, but it is not for this topic. Thank you very much for your help.
Title: Re: [Solved] The backup process
Post by: Rich on May 14, 2012, 01:03:34 PM
Hi forsik
Glad I could help.