FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-05-2007, 04:24 PM
David Brodbeck
 
Default Preferred Backup Method?

On Dec 5, 2007, at 8:12 AM, Michael Pobega wrote:


I'm trying to write a shell script to use tar for backups, but I
want to

know; Which directories are nessecary to backup with tar and which
aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
all of my chroots) and /etc are, but are any of the other directories
mandatory to backup? Or are any of these directories fruitless to
backup?


The answer is, "it depends." How much custom configuration have you
done? How fast does the system need to be back in service?


For desktop machines that have basically stock installations, I often
only back up /home and /etc, plus maybe /var/www if the machine has a
web server. I don't see any point in using up space backing up
binaries that I can easily reinstall from the Debian CDs. But on a
system where I've built lots of local software or done lots of custom
scripting, backing up the binaries makes more sense.


Excluding /tmp and /var/tmp makes sense. So does excluding data
caches -- /var/cache/apt, your squid cache directory if you're
running squid, maybe even web browser caches if you're pinched for
space. On systems that run udev, backing up /dev is also fruitless,
although it doesn't really take up much space. And you should always
exclude /proc. It's not a "real" filesystem anyway.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 05:11 PM
andy
 
Default Preferred Backup Method?

David Brodbeck wrote:


On Dec 5, 2007, at 8:12 AM, Michael Pobega wrote:


I'm trying to write a shell script to use tar for backups, but I want to
know; Which directories are nessecary to backup with tar and which
aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
all of my chroots) and /etc are, but are any of the other directories
mandatory to backup? Or are any of these directories fruitless to
backup?


The answer is, "it depends." How much custom configuration have you
done? How fast does the system need to be back in service?


For desktop machines that have basically stock installations, I often
only back up /home and /etc, plus maybe /var/www if the machine has a
web server. I don't see any point in using up space backing up
binaries that I can easily reinstall from the Debian CDs. But on a
system where I've built lots of local software or done lots of custom
scripting, backing up the binaries makes more sense.


Excluding /tmp and /var/tmp makes sense. So does excluding data
caches -- /var/cache/apt, your squid cache directory if you're running
squid, maybe even web browser caches if you're pinched for space. On
systems that run udev, backing up /dev is also fruitless, although it
doesn't really take up much space. And you should always exclude
/proc. It's not a "real" filesystem anyway.



Just to wade in here, since the OP has asked a question that is also
topical for me now:


I'd be wanting to do a back-up from my own machine to an external USB
HDD as well as from a second machine connected to the LAN, both using
Debian. I would want to save a back up of /home and /etc initially and
then a weekly incremental back up of anything that has changed in the
meantime. I don't need the encryption and don't really need the
compression (the USB HDD is 500GB which can easily swallow both of the
HDDs being backed up).


A number of suggestions as to the best program to use for backing up
have been made, but many sound like they are overkill for my purposes.
All I would need is something simple (like me ) and reliable. Any
recommendations for this purpose?


Thanks

Andy


--

"If they can get you asking the wrong questions, they don't have to worry about the answers." - Thomas Pynchon, "Gravity's Rainbow"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 06:22 PM
Bill Smith
 
Default Preferred Backup Method?

andy wrote:

David Brodbeck wrote:


On Dec 5, 2007, at 8:12 AM, Michael Pobega wrote:


I'm trying to write a shell script to use tar for backups, but I
want to

know; Which directories are nessecary to backup with tar and which
aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
all of my chroots) and /etc are, but are any of the other directories
mandatory to backup? Or are any of these directories fruitless to
backup?


The answer is, "it depends." How much custom configuration have you
done? How fast does the system need to be back in service?


For desktop machines that have basically stock installations, I often
only back up /home and /etc, plus maybe /var/www if the machine has a
web server. I don't see any point in using up space backing up
binaries that I can easily reinstall from the Debian CDs. But on a
system where I've built lots of local software or done lots of custom
scripting, backing up the binaries makes more sense.


Excluding /tmp and /var/tmp makes sense. So does excluding data
caches -- /var/cache/apt, your squid cache directory if you're
running squid, maybe even web browser caches if you're pinched for
space. On systems that run udev, backing up /dev is also fruitless,
although it doesn't really take up much space. And you should always
exclude /proc. It's not a "real" filesystem anyway.



Just to wade in here, since the OP has asked a question that is also
topical for me now:


I'd be wanting to do a back-up from my own machine to an external USB
HDD as well as from a second machine connected to the LAN, both using
Debian. I would want to save a back up of /home and /etc initially and
then a weekly incremental back up of anything that has changed in the
meantime. I don't need the encryption and don't really need the
compression (the USB HDD is 500GB which can easily swallow both of the
HDDs being backed up).


A number of suggestions as to the best program to use for backing up
have been made, but many sound like they are overkill for my purposes.
All I would need is something simple (like me ) and reliable. Any
recommendations for this purpose?
I use rsback, which is just a very handy backend to rsync, it produces
incremental backups
from the main server, 2 samba shares and all the homes with the imap
mail to a second server
it is backed up onto another samba share on the second machine, so the
people in the office

can they copy it off onto external drives to take home.
I just run it through a series of cron jobs every night, no problems at all.
HTH




Thanks

Andy





--
Bill


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 08:21 PM
Ron Johnson
 
Default Preferred Backup Method?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/05/07 10:12, Michael Pobega wrote:
> On Tue, Dec 04, 2007 at 08:29:03PM -0600, Ron Johnson wrote:
[snip]
>> Plain old "date"? No. I prefer `date +%y%m%d.%H%M`.
>
>
> I'm trying to write a shell script to use tar for backups, but I want to
> know; Which directories are nessecary to backup with tar and which
> aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
> all of my chroots) and /etc are, but are any of the other directories
> mandatory to backup? Or are any of these directories fruitless to
> backup?

Did you get the script I attached to the email you replied to? It
works like a champ for me.

- --
Ron Johnson, Jr.
Jefferson LA USA

"Your mistletoe is no match for my TOW missile." Santa-bot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHVxZQS9HxQb37XmcRAnSkAJ92DXWrELpiznMxhEGaoM +Z/MOnIACfdN5k
1GipiB7IqHMpOqI4gSZufCI=
=c+C4
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 08:26 PM
Michael Pobega
 
Default Preferred Backup Method?

On Wed, Dec 05, 2007 at 03:21:20PM -0600, Ron Johnson wrote:
> On 12/05/07 10:12, Michael Pobega wrote:
> > On Tue, Dec 04, 2007 at 08:29:03PM -0600, Ron Johnson wrote:
> [snip]
> >> Plain old "date"? No. I prefer `date +%y%m%d.%H%M`.
> >
> >
> > I'm trying to write a shell script to use tar for backups, but I want to
> > know; Which directories are nessecary to backup with tar and which
> > aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
> > all of my chroots) and /etc are, but are any of the other directories
> > mandatory to backup? Or are any of these directories fruitless to
> > backup?
>
> Did you get the script I attached to the email you replied to? It
> works like a champ for me.
>

I got it, but although that script may work for you it's too particular
of a use; I have a lot of files I need to backup, so it'd be better for
me to backup everything manually myself.

My shell script works, but I keep running out of disc space; Does anyone
know if there's a way I can transfer the file over to my other laptop
once it's done tarring (Effectively removing the need for a /backup dir
on my HDD?) Once I hit 13G on my root partition I run out of room.

My shell script it attached.

--
If programmers deserve to be rewarded for creating innovative
programs, by the same token they deserve to be punished if they
restrict the use of these programs.
- Richard Stallman
 
Old 12-05-2007, 08:33 PM
Ron Johnson
 
Default Preferred Backup Method?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/05/07 15:26, Michael Pobega wrote:
> On Wed, Dec 05, 2007 at 03:21:20PM -0600, Ron Johnson wrote:
>> On 12/05/07 10:12, Michael Pobega wrote:
>>> On Tue, Dec 04, 2007 at 08:29:03PM -0600, Ron Johnson wrote:
>> [snip]
>>>> Plain old "date"? No. I prefer `date +%y%m%d.%H%M`.
>>>
>>> I'm trying to write a shell script to use tar for backups, but I want to
>>> know; Which directories are nessecary to backup with tar and which
>>> aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
>>> all of my chroots) and /etc are, but are any of the other directories
>>> mandatory to backup? Or are any of these directories fruitless to
>>> backup?
>> Did you get the script I attached to the email you replied to? It
>> works like a champ for me.
>>
>
> I got it, but although that script may work for you it's too particular
> of a use; I have a lot of files I need to backup, so it'd be better for
> me to backup everything manually myself.
>
> My shell script works, but I keep running out of disc space; Does anyone
> know if there's a way I can transfer the file over to my other laptop
> once it's done tarring (Effectively removing the need for a /backup dir
> on my HDD?) Once I hit 13G on my root partition I run out of room.

Sure. tar understands stdin/stdout, so pipe it across an ssh link.

Or mount the laptop's drive using NFS.

> My shell script it attached.
>


- --
Ron Johnson, Jr.
Jefferson LA USA

"Your mistletoe is no match for my TOW missile." Santa-bot
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHVxklS9HxQb37XmcRAiBrAKDgFazDzA4eLu9VASMV8+ rhdryUjACgkc2S
IaJKFn7Q+MAVWQRZy3wyAWE=
=+zbN
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 09:23 PM
andy
 
Default Preferred Backup Method?

Bill Smith wrote:

andy wrote:

David Brodbeck wrote:


On Dec 5, 2007, at 8:12 AM, Michael Pobega wrote:


I'm trying to write a shell script to use tar for backups, but I
want to

know; Which directories are nessecary to backup with tar and which
aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
all of my chroots) and /etc are, but are any of the other directories
mandatory to backup? Or are any of these directories fruitless to
backup?


The answer is, "it depends." How much custom configuration have you
done? How fast does the system need to be back in service?


For desktop machines that have basically stock installations, I
often only back up /home and /etc, plus maybe /var/www if the
machine has a web server. I don't see any point in using up space
backing up binaries that I can easily reinstall from the Debian
CDs. But on a system where I've built lots of local software or
done lots of custom scripting, backing up the binaries makes more
sense.


Excluding /tmp and /var/tmp makes sense. So does excluding data
caches -- /var/cache/apt, your squid cache directory if you're
running squid, maybe even web browser caches if you're pinched for
space. On systems that run udev, backing up /dev is also fruitless,
although it doesn't really take up much space. And you should
always exclude /proc. It's not a "real" filesystem anyway.



Just to wade in here, since the OP has asked a question that is also
topical for me now:


I'd be wanting to do a back-up from my own machine to an external USB
HDD as well as from a second machine connected to the LAN, both using
Debian. I would want to save a back up of /home and /etc initially
and then a weekly incremental back up of anything that has changed in
the meantime. I don't need the encryption and don't really need the
compression (the USB HDD is 500GB which can easily swallow both of
the HDDs being backed up).


A number of suggestions as to the best program to use for backing up
have been made, but many sound like they are overkill for my
purposes. All I would need is something simple (like me ) and
reliable. Any recommendations for this purpose?
I use rsback, which is just a very handy backend to rsync, it produces
incremental backups
from the main server, 2 samba shares and all the homes with the imap
mail to a second server
it is backed up onto another samba share on the second machine, so the
people in the office

can they copy it off onto external drives to take home.
I just run it through a series of cron jobs every night, no problems
at all.

HTH




Thanks

Andy





Thanks Bill - as I stated, I want something that is straightforward and
will do incremental back ups, so if this does the trick then I will
experiment with both rsync as well as with rsback.


Many thanks

Andy

--

"If they can get you asking the wrong questions, they don't have to worry about the answers." - Thomas Pynchon, "Gravity's Rainbow"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 10:16 PM
Michael Pobega
 
Default Preferred Backup Method?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Dec 05, 2007 at 03:33:25PM -0600, Ron Johnson wrote:
> On 12/05/07 15:26, Michael Pobega wrote:
> > On Wed, Dec 05, 2007 at 03:21:20PM -0600, Ron Johnson wrote:
> >> On 12/05/07 10:12, Michael Pobega wrote:
> >>> On Tue, Dec 04, 2007 at 08:29:03PM -0600, Ron Johnson wrote:
> >> [snip]
> >>>> Plain old "date"? No. I prefer `date +%y%m%d.%H%M`.
> >>>
> >>> I'm trying to write a shell script to use tar for backups, but I want to
> >>> know; Which directories are nessecary to backup with tar and which
> >>> aren't? Obviously /bin, /usr, /home, /boot, /lib, /srv (Where I keep
> >>> all of my chroots) and /etc are, but are any of the other directories
> >>> mandatory to backup? Or are any of these directories fruitless to
> >>> backup?
> >> Did you get the script I attached to the email you replied to? It
> >> works like a champ for me.
> >>
> >
> > I got it, but although that script may work for you it's too particular
> > of a use; I have a lot of files I need to backup, so it'd be better for
> > me to backup everything manually myself.
> >
> > My shell script works, but I keep running out of disc space; Does anyone
> > know if there's a way I can transfer the file over to my other laptop
> > once it's done tarring (Effectively removing the need for a /backup dir
> > on my HDD?) Once I hit 13G on my root partition I run out of room.
>
> Sure. tar understands stdin/stdout, so pipe it across an ssh link.
>

Something like:

tar cvvf foo.tar bar | ssh user@dest "cat > foo.tar"

Or am I doing it wrong (I most likely am)? I've never done any sort of
piping through SSH before, so any sort of help would be appreciated.

- --
If programmers deserve to be rewarded for creating innovative
programs, by the same token they deserve to be punished if they
restrict the use of these programs.
- Richard Stallman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHVzE/g6qL2BGnx4QRAmJNAKCArunL8L/Xvgp1k8oLLV+RPVav+ACeNajv
HkyEMMESTc+sQjD4dGlJAug=
=2JRz
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 10:35 PM
David Brodbeck
 
Default Preferred Backup Method?

On Dec 5, 2007, at 3:16 PM, Michael Pobega wrote:

tar cvvf foo.tar bar | ssh user@dest "cat > foo.tar"

Or am I doing it wrong (I most likely am)? I've never done any sort of
piping through SSH before, so any sort of help would be appreciated.


You're close. Try this:

tar cvvf - bar | ssh -e none user@dest "cat >foo.tar"

Using - as the filename tells tar to output to stdout. "-e none"
disables SSH's escape character, making the session fully transparent
-- otherwise SSH will go into command mode if your tar output happens
to contain a line that starts with ~.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-05-2007, 11:39 PM
Michael Pobega
 
Default Preferred Backup Method?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Dec 05, 2007 at 03:35:46PM -0800, David Brodbeck wrote:
>
> On Dec 5, 2007, at 3:16 PM, Michael Pobega wrote:
>> tar cvvf foo.tar bar | ssh user@dest "cat > foo.tar"
>>
>> Or am I doing it wrong (I most likely am)? I've never done any sort of
>> piping through SSH before, so any sort of help would be appreciated.
>
> You're close. Try this:
>
> tar cvvf - bar | ssh -e none user@dest "cat >foo.tar"
>
> Using - as the filename tells tar to output to stdout. "-e none" disables
> SSH's escape character, making the session fully transparent -- otherwise
> SSH will go into command mode if your tar output happens to contain a line
> that starts with ~.
>

Very nice. I'll be trying this when I get home; Although before I
attempt this I'll probably attempt to install OpenBSD on my other
laptop -- But that's a whole 'nother story.

- --
If programmers deserve to be rewarded for creating innovative
programs, by the same token they deserve to be punished if they
restrict the use of these programs.
- Richard Stallman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHV0TAg6qL2BGnx4QRAu5cAJwI+CcxoPpxnh9nG1dzs2 4yWf1GYgCgukB+
m7jGtW7YFU6dX2Q1LdW4kMc=
=j5ZD
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 11:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org