Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Backing up my settings and files - noob alert :)

 
   Soft32 Home -> Linux -> General Discussions RSS
Next:  [Q] how to do linux system image backup and recov..  
Author Message
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 1) Posted: Sun Jan 30, 2005 6:26 pm
Post subject: Backing up my settings and files - noob alert :)
Imported from groups: alt>os>linux>redhat, others (more info?)

This message is not archived
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 373



(Msg. 2) Posted: Sun Jan 30, 2005 6:26 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <pan.2005.01.31.00.30.00.104908.RemoveThis@nowhere.lan>, Leythos wrote:

>Now that I've moved to FC3 and find that I can do about 80% of all my work
>and having had to wipe/reinstall after the 2.6.10-1.741 kernel update I
>find that I need to know how to backup my data in case it happens again.

This is just a play box for you, right? I would assume that a "work"
box would get the general 'back up everything' treatment.

Our 'work' systems have the "system" files on one disk, and this doesn't
change very often. We use a central authentication mechanism (so the
/etc/passwd and /etc/shadow files are not critical), and ALL user home
directories are on central file servers. Thus, we have what amounts to
be an 'install image' on one of the servers. When we build new hardware,
we simply boot using a floppy, connect to the file server, and pour the
install right in. We then edit a few files like /etc/sysconfig/network,
/etc/hosts, and /etc/sysconfig/network-scripts/ifcfg-eth0 so that "this"
hostname and address are there, and we're done. (For security reasons,
we don't run dynamic addressing/hostnames - _everything_ is statically
addressed/configured.) Updates are run as a cron job in the middle of
the night, and the image file is updated at the same general time. The
'user' home directories are backed up nightly off the file server, and
that leaves only minor configuration files that need backup. As these
rarely change, we basically do a 'find / -newer last.update.timestamp
-exec ls -lad {} \;' to find all files that have changed since the last
update. A restore is then just popping the image on, and then copying
those incremental backups back onto the system.

You are probably in need of some understanding of what/where files are.
You say you just got the system back up, so here are a number of things
I'd suggest doing.

1. rpm -Va > files.that.changed
2. find / -ctime -10 -exec ls -lad {} \; > more.files.2.look.at

For read access, you'll have to run both those commands as root. The first
one uses the package manager to see what files that the package manager
knows about have changed. See the man page for 'rpm' under 'VERIFICATION'
for an explanation of the output. Now, here's a point to ponder:

[compton ~]$ rpm -Vf /etc/passwd
S.5....T c /etc/hosts.allow
S.5....T c /etc/hosts.deny
S.5....T c /etc/profile
...?..... c /etc/securetty
S.5....T c /etc/services
[compton ~]$

Here, I told rpm to verify the package that "contains" /etc/passwd. Now I'm
sure you'll agree that the distributor couldn't possibly know what users I
have here, yet /etc/passwd doesn't show up as an altered file. (The question
mark flag in /etc/securetty is because I ran the command as me, and I don't
have permission to read that file.)

This is why you run the second command above. The 'find' looks for stuff that
has had something that changes the 'ctime' (any change that would change the
directory entry) starting at the top of the file system. In both of these
commands, you probably want to ignore the /proc/ (imaginary file system)
and /dev tree. Again, see the man page for 'find'.

>I logon as a user, run Evolution with Exchange 2000 server connection, no
>POP connections, PAN, OO Documents, etc... Can I just burn my home folder
>to a DVD and expect to be able to restore it with all my settings on
>another machine?

That depends. Probably, this would work, but there could be 'ownership'
problems, and depending on how you "call" filenames (below), you may be
missing some. UNIX systems actually keep track of ownership by UID numbers,
and these are translated to usernames via entries in /etc/passwd. For
example:

[compton ~]$ ls -ln 113673
-rw------- 1 824 13 1586 Jan 30 17:44 113673
[compton ~]$ stat 113673
File: "113673"
Size: 1586 Filetype: Regular File
Mode: (0600/-rw-------) Uid: ( 824/ibuprofin) Gid: ( 13/ news)
Device: 3,0 Inode: 22037 Links: 1
Access: Sun Jan 30 18:38:32 2005(00000.00:15:16)
Modify: Sun Jan 30 17:44:29 2005(00000.01:09:19)
Change: Sun Jan 30 17:44:29 2005(00000.01:09:19)
[compton ~]$ id
uid=824(ibuprofin) gid=100(users) groups=100(users)
[compton ~]$ grep 824 /etc/passwd
ibuprofin:x:824:100:Moe Trin:/ibuprofin:/bin/bash
[compton ~]$

here files are owned by user number 824. There is an entry in the passwd
file that has the login name 'ibuprofin' in the first field, and the user
ID '824' in the third.

There may be some files in /etc/ that are important. The /etc/ tree is
supposed to be where the system configuration files live. See the 'File
Hierarchy Standard' at http://www.pathname.com/fhs/ for a lot more info.
See also the 'Linux-Filesystem-Hierarchy' at http://tldp.org/guides.html
(although it does have some minor errors).

Don't forget that many user configuration files are 'dot files' meaning
that the name begins with a dot. These are "hidden" from the simple
directory listings (ls -l) and the '*' wildcard DOES NOT EXPAND to
include them. To see them, use 'ls -lA' (or ls -la) or use '.*' as the
wildcard. You're probable used to typing 'dir *.*' to see all files
except (pushing my DOS memories here) those with the 'System' or 'Hidden'
attribute. Try 'ls -l * .*' (notice the space) and see what that does.
You may want to pipe that to a pager like 'more' or 'less' or 'most' if
there are a lot of files.

You probably want to spend some time reading the books that are available
at the Linux Documentation Project (tldp.org/guides.html noted above).
Last I checked, there were _about_ 30 books (no idea how many pages that
would be) for free download. Then there are the HOWTOs - about 480 of them,
which total about 3.9 million words, or roughly 11,900 pages.

Old guy
Back to top
Login to vote
Bill Unruh

External


Since: May 12, 2004
Posts: 28



(Msg. 3) Posted: Sun Jan 30, 2005 6:48 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Leythos <void.DeleteThis@nowhere.lan> writes:

>Now that I've moved to FC3 and find that I can do about 80% of all my work
>and having had to wipe/reinstall after the 2.6.10-1.741 kernel update I
>find that I need to know how to backup my data in case it happens again.

>I logon as a user, run Evolution with Exchange 2000 server connection, no
>POP connections, PAN, OO Documents, etc... Can I just burn my home folder
>to a DVD and expect to be able to restore it with all my settings on
>another machine?

Sure, assuming those settings are in your home directlry. System settings
are not, so you should also backup /etc and /var/spool
Back to top
Login to vote
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 4) Posted: Sun Jan 30, 2005 8:06 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 5) Posted: Sun Jan 30, 2005 8:33 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 373



(Msg. 6) Posted: Mon Jan 31, 2005 1:51 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <pan.2005.01.31.02.37.02.203973 RemoveThis @nowhere.lan>, Leythos wrote:

>Sorry for the top-post type reply, but you're my hero. I'll have to take
>time to digest this and understand it.

Do take the time to scan the man pages mentioned. Note also that I
include command examples purposely, so you can see what I'm doing.
Some of the stuff may seem unusual, but I'm showing exactly what
happens. The man pages will usually explain the unusual stuff.

>You are right, this is my test machine - to see what I can do and learn
>about Linux and it's going well as far as applications, I can do about
>everything I need to do daily (except for development).

That's a very good way to learn. I dunno, I've probably already shown you
this output (watch the line wrap).

[compton ~]$ ls `echo $PATH | tr ':' ' '` | egrep -vc '(Neutral^$)'
1296
[compton ~]$ echo $HISTSIZE
1000
[compton ~]$ history | sed 's/^......//' | tr '|' '\n' | sed 's/^ *//' | cut
-d' ' -f1 | sort -u | wc -l
81
[compton ~]$ ^-u | wc -l^| uniq -c | sort -n | tail -3
history | sed 's/^......//' | tr '|' '\n' | sed 's/^ *//' | cut -d' ' -f1 | sort
| uniq -c | sort -n | tail -3
60 grep
106 ls
180 less
[compton ~]$

Translation: As 'me' there are 1296 "commands" in my PATH. My shell remembers
the last 1000 commands - defined as me pressing the Enter key, so what you
see above is considered as just four commands. The first line beginning with
the 'history' command breaks down those last 1000 commands into individual
components, sorts them, and then counts the number of different actual
commands. So, of the last 1000 commands in this shell, I was typing the
same 81 different commands. The last line is a 'command substitution',
which allows me to reuse a command, changing it slightly. It says to
replace the section of the last command beginning with the -u, and the pipe
to wc (enclosed with carets), with the stuff that followed the second caret.
This changed the results to identify how many times I used each component
command. In this shell, it seems that I'm using 'grep', 'ls' and the pager
'less' quite a lot. By the way, can you tell I'm a command line dinosaur?

As root, I have about 1625 commands in the PATH, but nearly always are
using under one hundred different ones.

What this means is that, while there is a lot of stuff to learn about,
you normally don't use that much of different things. Bottom line - you
don't have to learn it all. In fact, there is almost always more than
one tool, and/or one way to do things. You are used to the pager 'more',
and Linux has that, but it also has 'less' and 'most' that do paging,
but offer different features. Want to query a DNS name server?

[compton ~]$ apropos name | grep server
dig (1) - send domain name query packets to name servers
dnsquery (1) - query domain name servers using resolver
host (1) - look up host names using domain server
nslookup (Cool - query Internet name servers interactively
nsupdate (Cool - update Internet name servers interactively
[compton ~]$

Linux comes with four - three actually, because 'nslookup' is deprecated.
But the idea is the same. Use a "suitable" tool to do a specific task.
Maybe you need to use several tools in cascade - the command above beginning
with the word 'history' is seven different ones each doing a part of the job.
It's the results that count.

>Now I need to start learning more about maintenance.

Linux Documentation Project - HOWTOs, man pages, info pages. You can
also go and buy real dead tree books - $DEITY knows I certainly have.
Yes, a lot of this comes with experience. You certainly didn't learn
all you know about windoze overnight, so you know it's going to take
some time to come up to speed on something completely different. But
it is doable, so hang in there.

Old guy
Back to top
Login to vote
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 7) Posted: Mon Jan 31, 2005 8:56 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 373



(Msg. 8) Posted: Tue Feb 01, 2005 2:40 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <pan.2005.02.01.03.05.28.186805.RemoveThis@nowhere.lan>, Leythos wrote:

>I still have to use XP since I have not been able to correctly connect to
>my 2000/2003 DC/s and access my files - I can browse the folders but
>clicking on them generates an error - can't open any documents or even
>text files. I'll play with that later.

One of the joys that I have is that I don't have any windoze boxes to
support - it's bad enough having several versions of *nix. Samba is
widely used in the Unix family, to the extent that there is a big-eight
newsgroup for it:

[compton ~]$ zgrep -i samba valid.newsgroups.01.15.05.gz
comp.protocols.smb SMB file sharing protocol and Samba SMB server/client.
[compton ~]$

As always, the key to troubleshooting is to pay attention to the error
messages. Being network oriented, I'd also use a sniffer like ethereal or
tcpdump to see what's in the packets going to/from the server and client.
That often exposes the dumb problems, like permissions and firewalling.

I notice you are staying with the less traveled newsgroups. alt.* and
linux.* are unofficial, and are carried on individual servers at the whim
of the news administrator for that server. This means that while they may
be more specialized, they also have less readership. Do consider the
comp.os.linux.* groups (there are 17 official groups).

>I love that Evolution works with my Exchange server, I don't really notice
>much difference between it and Outlook (except that in Outlook I could
>have multiple Exchange accounts open at the same time)

Dunno why that might be a problem - admittedly I don't use Evolution - but
multiple "users" at the same time is common. Heck,

[compton ~]$ users | wc -w
20
[compton ~]$

there's 20 of me running on this box at the moment, although some of these
are ssh sessions into other systems on the local net.

Old guy
Back to top
Login to vote
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 9) Posted: Tue Feb 01, 2005 9:02 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 373



(Msg. 10) Posted: Wed Feb 02, 2005 12:35 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <pan.2005.02.02.03.06.56.211664 RemoveThis @nowhere.lan>, Leythos wrote:

>I was looking at total article counts on the local Usenet server provided
>by the RR affiliate in my region - it seems that a.o.l.r and linux.redhad
>have the most posts, so I was trying to garner info from the largest
>posting base.

That's most unusual. Lemme see... This is off the giganews.com server:

[compton ~]$ tail -400 newslog | grep linux | grep Retr | awk '{ print $3
" " $6 }' | sort
alt.comp.linux: 17461-17482.
alt.linux: 121553-121570.
alt.os.linux.gentoo: 20704-20726.
alt.os.linux.mandrake: 613561-613725.
alt.os.linux.redhat: 34802-34820.
alt.os.linux.suse: 216695-216816.
alt.os.linux: 348270-348315.
comp.os.linux.admin: 21592-21595.
comp.os.linux.announce: 17147-17149.
comp.os.linux.hardware: 316489-316547.
comp.os.linux.help: 68722-68723.
comp.os.linux.misc: 591090-591191.
comp.os.linux.networking: 453982-454033.
comp.os.linux.questions: 50815-50822.
comp.os.linux.redhat: 42669-42676.
comp.os.linux.security: 75751-75760.
comp.os.linux.setup: 465428-465505.
linux.redhat: 113771-113811
[compton ~]$

This is just what gets downloaded locally (about 85 groups, I think.)
The numbers on the right are the article numbers available within the
past 24 hours. Of the comp.os.linux.* groups, 'announce', 'hardware',
'misc', 'networking', 'security', and 'setup' are in the valid newsgroup
list. The others are alternative, or unofficial. For example, c.o.l.help
was renamed 'c.o.l.misc' back in 1994, and c.o.l.admin was renamed
c.o.l.setup. Some news admins are just slow to get the word I suppose,
or they're engaged in news group numbers wars. I can't find where
c.o.l.questions or c.o.l.redhat were ever official.

The 'linux.redhat' groups started out as mirrors of official Red Hat
mailing lists (the linux.* groups are of similar origin) set up from
a server in Germany. I've not seen anything from the mailing lists in
those groups in a number of years. Originally, many news admins marked
these groups as 'Moderated' meaning you couldn't post directly to them.
That's fallen by the wayside, and they're now just another alternative
newsgroup.

>I looked at all the linux.redhat groups I just guessed that a noob would
>be OK in these couple groups Smile I didn't see where my question really fit
>any of the others.

RFC1855 (Netiquette Guidelines) suggested reading a group for a minimum
of one to two months before posting (no kidding - first item in section
3.1.1), and that has long disappeared as the norm. The idea was to read
the group so that you had an understanding of what it was about, what was
acceptable, what was not, and so on. Of course, the RFC dates from October
1995, which was before groups.goggle.com, and somewhat early in the life
of www.dejanews.com (now absorbed into google). An inital search on a
question there, if it doesn't provide the answer will give strong clues
about which group is most appropriate.

>With c.o.l.r I only show 49 posts in the last couple weeks on our new server,

[compton ~]$ grep '01/[03]1/2005' newslog | grep 'os.linux.redhat' | grep Retr
| awk '{ print $1 " " $3 " " $6 }'
01/01/2005 alt.os.linux.redhat: 34258-34261.
01/01/2005 comp.os.linux.redhat: 42460-42463.
01/31/2005 alt.os.linux.redhat: 34735-34749
01/31/2005 comp.os.linux.redhat: 42665-42665
[compton ~]$

What's that - about 490 for the month in alt.os.linux.redhat, and 205 in
comp.os.linux.redhat? This is mid-week, and you might compare the other
groups abovem and scale off that.

>I will see if I can find another server with more articles.

I don't use Pan, but you might look through the man pages. Most every
newsreader I've ever used had the capability of downloading the complete
list of news groups that the news server carries. While there are only
17 groups in the big eight, most carry quite a few more. For example,

[compton ~]$ grep -c linux .newsrc
899
[compton ~]$ wc -l .newsrc
81265
[compton ~]$

giganews carries 899 groups that have the word linux in the title (out of
a total of 81k+ groups they carry), but from some limited experience, most
of them are not worth the bandwidth to even download the headers from - or
trying to. My news server announced it was adding 'grc.techtalk.linux'
about a month ago (probably a mirror of one of Steve Gibson's propaganda
lists) and for giggles, I looked to see if anything had been posted to it
- nothing in three weeks, so I gave up.

Old guy
Back to top
Login to vote
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 11) Posted: Wed Feb 02, 2005 8:36 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Moe Trin

External


Since: Dec 26, 2004
Posts: 373



(Msg. 12) Posted: Thu Feb 03, 2005 1:53 pm
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <pan.2005.02.03.02.45.17.128218.RemoveThis@nowhere.lan>, Leythos wrote:

>On Wed, 02 Feb 2005 18:35:06 -0600, Moe Trin wrote:

>The local RR server carries 496 groups with Linux in them, that's my
>limit, there are about 20 with the word RedHat in there.

That's not that bad.

>> alt.comp.linux: 17461-17482.

>> The numbers on the right are the article numbers available within the
>> past 24 hours.

>I thought he numbers represented the article numbers ID, meaning that
>17461-17482 would indicate 20 articles on the server.

Correct

>The ID number should roll over at some point.

On my news reader (slrn), the article numbers are unsigned int. A quick
scan of RFC0977 and RFC1036 doesn't say anything. I wonder if this is
another unimportant barrier like time_t (32 bit Unix time hits the end
of the world in January 2038, but by then, everyone will be using 64 or
128 bit time_t which should push the end of time_t beyond the heat death
of the sun).

>Expired articles are ones in the pre-17461 range that are no longer on
>the server.

Not really true - the meaning here is that 17461 was the first "unread"
article that the downloading application found. There is no indication
on the server of 'read' or 'unread' - that's handled by your newsreader.
Most of the commercial servers keep articles in non-binary groups for a
fairly long period. (I know supernews was keeping the big eight groups
[comp.*, humanities.*, misc.*, news.*, rec.*, sci.*, soc.*, and talk.*]
for two months. Six years ago, that was a 1500 Gig disk farm back when 33
Gig drives were about the largest available. I've no idea what the spool
might be now, nor what 'giganews' might be keeping - it's probably
comparable.) The little leaf server I'm actually reading from keeps a
minimum of five days.

>It could well be that our local server is not getting all the articles,

For the alternative or bogus groups, that wouldn't be surprising. If the
news peers don't carry the groups, they won't forward them to servers that
do.

>I may have to switch to a premium Usenet service - one without the binaries.

Consider news.individual.net or news.individual.de. For a while, I was
working on a problem where I was getting great clues off a newsgroup that
my server wasn't carrying. In this particular case, groups.google was
carrying it, and I was reading it there. Since they've changed formats,
it's not as easy to do, but not totally impossible.

Old guy
Back to top
Login to vote
Leythos

External


Since: Mar 03, 2005
Posts: 54



(Msg. 13) Posted: Fri Feb 04, 2005 7:01 am
Post subject: Re: Backing up my settings and files - noob alert :) [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Backing up downloaded .rpm files from yum - Hey eveyone... is there a way to backup the files that yum uses to update the fedora 4 system after they're downloaded...

Noob problem - Hey, I'm new to linux, just got Redhat 9, and I can't seem to get it to recognize my modem. I have a Best Data v.92..

noob--cups error - Redhat 9.0, on boot the cups service fails, with error cups:cupsd:child exited on signal 25! If I try and stop and..

Backing Up - Ok here goes, This is going to sound like a lame question but here is my scenario. I have 2 boxes , identical running...

(nOOb)Help: Installing USB-CD-RW device under RH8 - Hi group, I am trying to install a Lacie CD-RW under Redhat8. It is a USB device. Because I am a newbie I was reading...

Backing up FC 4 - What software to use for backing up? I need something that will back up to an external USB drive. JC
       Soft32 Home -> Linux -> General Discussions All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]