Re: incomplete back-ups
- From: "s. keeling" <keeling@xxxxxxxxxxx>
- Date: Tue, 19 Jun 2007 16:05:34 GMT
grace <zympoul@xxxxxxxxx>:
i've been creating back-ups of our files every night through cron jobs
and my script
for this is like this:
0 21 * * 1 sudo cp -r /home /db/home_bu/mon
0 21 * * 2 sudo cp -r /home /db/home_bu/tue
...
For several months, the scripts are working fine...however due to
[snip]
The only differrence is that we upgraded from Ubuntu 5.04 (the
Hoary hedgehog) to 5.10 (Breezy Badger)...
On this i transferred my cron scripts and have done a series of
testing where i found no problem at all..
But when i checked yesterday, my back-ups whch is located on
another harddrive and is mounted as /db, contains nothing but the
administrator and ITdept folders only, and the rest, has not been
backed-up. Thinking that my backup harddisk maybe full that is why
[snip]
rm -rf /db/home_bu/mon/
mkdir /db/home_bu/mon/
cd /
sudo cp -r /home /db/home_bu/mon
All that blew away was the one day. What's in tue, wed, thu, ...? It
could be they're the ones that're filling (or mostly filling) /db.
..deleting first the existing back-up and creating a new one..
..and added to my crontab like this:
0 21 * * 1 /home/scripts/homebu_mon.sh
0 21 * * 2 /home/scripts/homebu_tue.sh
...
If this is /etc/crontab, you're missing the field which says who to
run the script as:
0 21 * * 1 root /home/scripts/homebu_mon.sh
....................^^^^
I tested again and, it works. But again when i checked it this
morning, the back up file has again the administrator and ITdept
Possible side-effect. If there's not enough space, it'll fail. As
well, if cron (or perhaps user "nobody"?) has no rights to look into
/home dirs which don't belong to it, it'll fail.
folders only..i don't understand this.. when i run the df command,
it returns:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/Ubuntu-root 75175056 20823028 50533328 30% /
[snip]
/dev/hdc1 76920416 76920052 0 100% /db
my back up drive is 100% used, is this the reason? if it is then i
Do that again after making space for your backups. Then run your
backup.
guess my approach to solving it is not good at all.
It's a little simplistic, but simple's good. It's got some kinks to
work out, is all. You might consider using a real archiver which can
do compression. That'll save you quite a bit of space. Eg.:
tar cvf /db/home_bu/20070619_home.tgz /home \
> /db/home_bu/20070619_home.log
or (my personal preference):
find /home -depth -mount -print0 | \
afio -z -Z bzip2 -v -T 3k \
-o /db/home_bu/20070619_home.afio \
-L /db/home_bu/20070619_home.log
That last one uses bzip2 compression, and doesn't compress anything
less than 3 Kb (for performance). It's also smart enought to
recognize file types that are already compressed, so not bother trying
to compress them again.
Keep banging your head on that wall. It'll fall over eventually. :-)
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
.
- Follow-Ups:
- Re: incomplete back-ups
- From: s. keeling
- Re: incomplete back-ups
- References:
- incomplete back-ups
- From: grace
- incomplete back-ups
- Prev by Date: Re: How to install linux from floppy, without a bootable cdrom drive?
- Next by Date: Re: incomplete back-ups
- Previous by thread: incomplete back-ups
- Next by thread: Re: incomplete back-ups
- Index(es):
Relevant Pages
|