Refracta Development, Scripts, etc.
Post a reply
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Snapshot excludes

Tue Oct 18, 2011 9:54 am

Problem: freshclam fails to run because it can't write to the log file, which doesn't exist. The current version of refractasnapshot excludes everything in /var/log, so I'm trying to find a way to preserve /var/log/clamav/* and still exclude the rest of the log files.
This way did not work:

Code:
  `- /var/log/*
  + /var/log/clamav/
  + /var/log/clamav/*
  `

This way works, but it's not perfect:

Code:
  `# The next two lines exclude everything in /var/log
  # except /var/log/clamav/ (or anything else beginning with "c")
  - /var/log/[a-b,A-Z]*
  - /var/log/[d-z]*`

Another option would be to list everything in /var/log separately.
Also note the leading slashes. In the next version of snapshot, all items in snapshot_exclude.list will have the leading slash. Without that, rsync looks for the pattern at all levels as it recurses, and that's what caused the problem with the missing "live" files and directories.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: Snapshot excludes

Tue Oct 18, 2011 8:56 pm

Is it a good idea to exclude the logs for dpkg, apt, dmesg, syslog, and so forth?
Seems like that may be valuable info that a user may want/need.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Snapshot excludes

Wed Oct 19, 2011 2:57 pm

Good question. I'm trying to figure out the answer. In beta2, you're missing the complete history of what I installed and removed. If anybody wants that, I can provide the log files as well as the `dpkg get-selections` output that I made along the way. Anything that the user does to their own system will be recorded in their own log files on their installed system.
Same for syslog - they'll have only the logs for their own system. If there's a reason why that information needs to be on a live-cd that will likely be booted on a different system, I can't think of it.
Part of the reason I excluded /var/log was to save space. In beta1, it takes up 16MB. Most of that is in the dpkg log. And another reason I excluded was because at some point, I saw my real login name in the auth log after forgetting to add the "user@" on some ssh login attempts.
But I'm happy to listen to any arguments for doing it differently. I could easily have missed something.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: Snapshot excludes

Wed Oct 19, 2011 5:07 pm

That makes sense. I was just looking at it from a users perspective but I guess a user can always edit the excludes file.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Snapshot excludes

Thu Oct 20, 2011 12:06 am

If a specific app requires a log file that's the only one needed. The others are surely useful only from the first run of a new installation?
I know how difficult it is to get a fully-functional system under 700mb, the log files can tip the balance.
It is simple for a user to get a package list (it could be included in the iso, a few kb) and make comparisons from a snap to the original

Code:
  `dpkg -l|grep ii|awk '{print $2}' |sed '1,5d'>packages.txt`

fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Snapshot excludes

Thu Oct 20, 2011 3:51 pm

I was thinking about including the package list files from the get-selections.sh script, so that someone could (almost) recreate the default installation if they needed. I think taskfer and deadbeef would be lost, since they were installed from .deb package files, but that's easy to work around.
I need to add instructions to the release notes for using get-selections.sh and set-selections.sh. Those scripts are now in the refracta section of my github repo.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.