WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Backup as a background task (that commits at shutdown)  (Read 2781 times)

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Backup as a background task (that commits at shutdown)
« on: April 22, 2011, 10:25:54 AM »
During a reboot the backup can take an annoyingly long time.  

Is it possibly a good idea to make backup a background task that:

1. only runs when the cpu and drives are idle
2. only transfers modified files
3. does not commit until you explicitly select Backup at shutdown

Also,

4. Vmware filing systems reside inside a .vmdk file and there is a tool where the host can mount this file and modify its contents. If a similar concept (mounting read-write a fs that resides in a single file) is available in linux, and maybe "tarfs" is it, then this might save cpu cycles as keeping it up to date would only require modified files to be written to it, rather than creating the entire mydata.tgz.
« Last Edit: April 22, 2011, 10:29:21 AM by Ulysses_ »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Backup as a background task (that commits at shutdown)
« Reply #1 on: April 22, 2011, 11:55:35 AM »
Google "loop mounts". Keep a persistent home to avoid long backup times.
The only barriers that can stop you are the ones you create yourself.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Backup as a background task (that commits at shutdown)
« Reply #2 on: April 22, 2011, 12:45:57 PM »
Use control panel -> System Stats -> bigHomeFiles
Adjust .xfieltool.lst to eliminate backing up unnecessary files,
and/or factor out static data to personal tcz extensions
or mount and use a persistent store.
10+ Years Contributing to Linux Open Source Projects.

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Re: Backup as a background task (that commits at shutdown)
« Reply #3 on: April 22, 2011, 01:09:28 PM »
factor out static data to personal tcz extensions
or mount and use a persistent store.

The persistent store solution is not according to the TC philosophy that makes it super-fast by having the filing system in memory.

Are files from personal tcz extensions kept in memory if you load the extension but do not access the files?
« Last Edit: April 22, 2011, 01:11:35 PM by Ulysses_ »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: Backup as a background task (that commits at shutdown)
« Reply #4 on: April 22, 2011, 01:29:36 PM »
Depends on whether those extensions are copied to fs (ram) or not.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: Backup as a background task (that commits at shutdown)
« Reply #5 on: April 22, 2011, 02:49:12 PM »
Hi Ulysses_
While background monitoring and backup may be appealing, there is a simpler way that could result
in considerable time savings if a lot of your files never get changed. Create a file called staticfiles.lst
containing the names of paths and filenames that don't change. Next, set up a script updatestaticfiles.sh
that tars and gzips that list of files and saves it to staticfiles.tgz on your backup media. The third step
could be one of the following methods:

1. Append your list to the xfiletool.lst file or
2. Modify the backup script to use your list in addition to xfiletool.lst.

Then add a line to bootlocal.sh to gunzip and untar the files to restore them upon start up.

Once set up your backups should run faster. When your backups start slowing down again add the
offending files to staticfiles.lst and run updatestaticfiles.sh. If you use method 1 above you will also
need to update xfiletool.lst.

One thing to be careful of is that you DO NOT add files required by the system during startup, stick
to personal files.

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Re: Backup as a background task (that commits at shutdown)
« Reply #6 on: April 22, 2011, 02:57:30 PM »
Alright.

Looking at the big picture, the idea is to try and limit the backup to as little modifiable data as possible, if I understand correctly.  

And therefore one must avoid using too much of the functionality in the repo, as too much writeable data would make the backup painfully slow?  

Instead, what if the backup happened in the background and therefore size was not an issue?  Then even caches could be backed up, painlessly and automatically, eg web server or browser caches.  While sticking to the philosophy of doing everything in ram for maximum performance.
« Last Edit: April 22, 2011, 02:59:32 PM by Ulysses_ »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Backup as a background task (that commits at shutdown)
« Reply #7 on: April 22, 2011, 03:38:32 PM »
Ulysses

I am not sure if you are running Tiny Core from a usb drive, or a hard drive.

If you are running it from a usb drive, or other solid state memory, using backup will prolong the life of the drive.

If you are running Tiny Core from a hard drive, you are better off with persistent home and opt. Any difference in performance will only be fractions of a second. You will not notice it. The only thing you will notice is the time taken to start up and shut down when using backup.


I was never concerned about the time taken to shut down. You can shut down Tiny Core and walk out of the room. After backup is complete, the computer will be turned off.

What annoyed me, was the time taken to start up. You want to be able to turn the computer on and use it. Not turn it on, and wait and wait and wait.

I have not used backup for a long time. I use persistent home and opt, and make new extensions for personal settings.
« Last Edit: April 22, 2011, 03:45:23 PM by Guy »
Many people see what is. Some people see what can be, and make a difference.

Offline Ulysses_

  • Full Member
  • ***
  • Posts: 232
Re: Backup as a background task (that commits at shutdown)
« Reply #8 on: April 22, 2011, 04:06:31 PM »
So flash wear is the reason for the backup scheme, not performance?  

And having home in the ram fs does not make a noticeable difference in performance?  Any benchmark results to back this up?  

One expects many applications such as a caching web server to be faster with the cache in the ram fs, than with persistent home and opt.

Quote
I was never concerned about the time taken to shut down.

Sure, it was the Reboot that was annoying.

Running TC from a hard drive, but from a fat32 partition (for easy access to the data from the vmware host using the vmware mount tool).
« Last Edit: April 22, 2011, 04:39:05 PM by Ulysses_ »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Backup as a background task (that commits at shutdown)
« Reply #9 on: April 22, 2011, 05:15:17 PM »
Why don't you do an experiment. Use persistent home and opt for awhile, and see what you think.
Many people see what is. Some people see what can be, and make a difference.