WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Backup of home even if persistent home is used  (Read 4622 times)

Offline helander

  • Full Member
  • ***
  • Posts: 183
Backup of home even if persistent home is used
« on: March 25, 2009, 05:28:52 AM »
I would have thought that if you booted with the "home" option, in order to get a persistent home, once I did a Backup the home directory would automatically be omitted from the backed up data. I did test this and it seems like mydata.tgz contains the full home directory.

Is this how it should be? If so; why?

Kind Regards
Lars

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Backup of home even if persistent home is used
« Reply #1 on: March 25, 2009, 10:28:57 AM »
The backup-restore system, by default, backs up files from /home/tc automatically, assuming that you are not using persistent home.  It's better to have duplicate files than to lose your files.

You have full control over what goes into mydata.tgz, using /opt/.filetool.lst and /opt/.xfiletool.lst
Remove "home/tc" from .filetool.lst and you should be fine.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Backup of home even if persistent home is used
« Reply #2 on: March 25, 2009, 10:33:29 AM »
I would never assume to delete anything from one's .filetool.lst or .xfiletool.lst.
I don't even change the default 'checked' backup upon shutdown.
The reason is because you should do regular backups to external devices even with persistency.
If you don't wish to have the backup as the default, set the BACKUP=0 in .profile
If you are using backup to backup a selected few files then you should edit your backup controlling lists.



10+ Years Contributing to Linux Open Source Projects.

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Backup of home even if persistent home is used
« Reply #3 on: March 25, 2009, 12:25:46 PM »
mikshaw and roberts thank you very much for your responses.

I guess I had a different view on the purpose of backup/restore.

In my view it was a way to "overcome" the fact that whatever changes you do to the system they are lost once you reboot. This could be viewed as system configuration persistency. Given how it works and how it is described this is at least one of the its purposes.

Secondly it can also be a pure backup service, i.e. save away in some secure place in case things go wrong and you have to restore.

I do not disagree that the latter purpose is valid.

However I think that the "main" reason for it in TC would be for the former purpose, due to the nature of TC design, since that is a missing piece of TC otherwise. Backup (long term secure your data) is not specific for TC and how often and how you would like to do that depends more on the system the distro is used in than the distro itself.

If you would agree about the "main" purpose, you could argue that persistent home should automatically be reduced from what gets backed up.


I am fine with the way it is, since I can specify to exclude /home, but I still think it would have been more "natural" with persistent home being automatically outside the scope of a default backup. And I will definitely only use the Backup/Restore scheme for getting system configuration persistence.

One negative effect of solving configuration persistency and backup with the same mechanism, is that you can only configure it for one of the two. I know that I can change the backup config files between the runs, but that is to error prone for an operation like this. I would rather have different file sets and you either provided a name of the file set to the command or if you had commands with different names (each operating on a different file set).




/Lars

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: Backup of home even if persistent home is used
« Reply #4 on: March 25, 2009, 03:39:55 PM »
Quote
you could argue that persistent home should automatically be reduced from what gets backed up.
I suppose you could do that, but is it important enough to do when leaving the user to edit one line of a tiny file is much easier.  TC is definitely about keeping things small, light, and simple.  I'm not sure adding a feature like that would be worth the trouble.  Roberts added persistent home to DSL 4 years ago (long after backup/restore) and carried the feature over to TC, and as far as I know you are the first person who has ever mentioned this.

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: Backup of home even if persistent home is used
« Reply #5 on: October 23, 2009, 03:08:19 PM »
Let me weigh in on this issue since I think that Helander makes a very good point, and my experience may show the potential confusion caused by having both a persistent home and an automatic backup. This confusion is apt to be typical of someone using Tiny Core for the first time.

I own an Eee 900 with Xandros living on the SSD drive(s). I decided to boot Tiny Core from an 8 GB SDHC card on which I had created four partitions of varying size. After a number of trial runs with TC on a 1 GB USB stick, I decided to put it on a 270 MB ext2 partition on the SDHC drive. I used the boot codes for a persistent home= and tce= on that drive.

In most respects that setup worked admirably--except for one problem. If I allowed backup on shutdown, I found that my backup file (mydata.gz) grew in size quite rapidly, even if I had made no changes to my system. Even worse, I quickly found myself getting file system errors on the ext2 partition, so I kept having to run e2fsck to remove them. I scratched my head and dug into the mydata.gz file to see what was causing its growth. The problem was related to Opera's /.opera directory, but the solution was NOT to add that directory to /opt/.xfiletool.lst. It's true that when I did that I could eliminate file system errors and the uninhibited growth of mydata.gz, but I also lost a lot of functionality in Opera, particularly its ability to remember what web page I was last browsing and where I was on that web page. (That ability is crucial if one wishes to use Tiny Core with Opera as an ebook reader!)

Eventually, I determined that my best solution is to have a persistent home on an ext3 partition (since it will be written to often), keep my *.tce and *.tcz files in /tce and /opt directories on the ext2 partition, and change the .profile file (in the /home directory) so that "export BACKUP=0".

I believe the setup would work fine with everything on a single ext3 partition, as long as "export BACKUP=0", but without that change, the growth in mydata.gz (caused by Opera) can be quite alarming. By the way, it wasn't enough to just add more lines to /opt/.xfiletool.lst. I added "home/tc/.opera/opcache", "home/tc/.opera/cache4"
"home/tc/.opera/usagereport", and "home/tc/.opera/images" and still didn't solve the problem--nor did I put an end to file system errors until I switched off the automatic backup.

Very likely, I did something boneheaded. My point is that perhaps one should recommend either persistent home and tce, or automatic backup . . . but not both.

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: Backup of home even if persistent home is used
« Reply #6 on: October 23, 2009, 08:28:30 PM »
Maybe this is an issue that needs to be looked at as an Opera problem rather than a backup problem?

Did you try changing your Preferences in Opera? I don't keep addresses, have memory cache at 20 M, disk cache at 0, empty on exit. Unlike you I don't have much need to keep content between browser sessions. I have accumulated a lot ot cookies though.

I haven't tweaked the backup settings for Opera files at all. The mydata file is about 1 M after several months of running TCL 2x versions.

Offline OldAdamUser2

  • Full Member
  • ***
  • Posts: 199
Re: Backup of home even if persistent home is used
« Reply #7 on: October 23, 2009, 08:50:09 PM »
Well, it's both an Opera problem and a backup problem, isn't it?

My Opera preferences are similar to yours. But I do keep 1000 addresses and have 40 MB of ram cache. Disk cache is off, and cache is set to empty on exit.

The file system errors were at least as troubling as the backup creep--and both are cured by avoiding backups. Why they occur is a mystery--but perhaps it has something to do with ext2.

Fortunately, persistent home and tce with backup off fixes everything.

I do have one fixed copy of mydata.gz if I ever need it, but why would I? The Tiny Core base can be downloaded in minutes--and even the tces and tgzs for my light-weight installation can be downloaded and reinstalled quickly. I use my netbook for browsing, youtube, email, and a  bit of writing--but nearly all of that is in the "cloud" environment. In that kind of use environment (which is ideally suited to Tiny Core) there is very little need for either a system backup or a home backup.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Backup of home even if persistent home is used
« Reply #8 on: October 23, 2009, 10:52:34 PM »
Many people see what is. Some people see what can be, and make a difference.

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: Backup of home even if persistent home is used
« Reply #9 on: October 23, 2009, 10:59:38 PM »
FWIW, I tried doing a little web surfing, then shutting down with backup and rebooting, just using Opera. Did this a couple of times and got a 1K to 2K jump in the size of the backup file each time. Presumably this reflects growth in the home/tc directory during Opera use. It seems to me though that this growth in home/tc would occur even with a persistent home (which I don't use)?

Your [OldAdamUser2] idea of just keeping a fixed mydata.gz sounds like a good one. Doesn't seem like you lose much by skipping the backup unless you've updated a file or preference or something you want to preserve.
« Last Edit: October 23, 2009, 11:23:33 PM by thane »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: Backup of home even if persistent home is used
« Reply #10 on: October 23, 2009, 11:12:23 PM »
If you use persistent home, and exclude those growing files from backup, using /opt/.xfiletool.lst, backup will be quicker.
Many people see what is. Some people see what can be, and make a difference.