LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   dar backup files are empty!! (http://www.linuxquestions.org/questions/linux-software-2/dar-backup-files-are-empty-565489/)

mazinoz 06-29-2007 07:40 PM

dar backup files are empty!!
 
Have used dar and kdar on a kubuntu edgy Dell D505 laptop and tested the restore, wrote cron scripts etc. All seemed fine until I looked at some data I rarely use only to find that the files are empty!!

Had formatted some hard drive partitions and installed edgy, then feisty (many problems relating to sda and mounting) went back to edgy. But don't remember doing anything to home directory, which is where the empty files are. The files are listed in the directory but are empty.

I also had a bad experience actually on the linuxquestions forum when icons started disappearing from my Desktop! when I was trying to get feisty problem resolved, hence formatting and reinstalling edgy.

Checked a backup from February this year, also had empty files.

Before I start making nefarious plots relating to my flatmate who is a developer and I know from things he said has hacked into my laptop, can
someone suggest what is going on?

Cheers

billymayday 06-29-2007 11:32 PM

Try posting you script and any messages that come up as you run it

bigrigdriver 06-29-2007 11:44 PM

I use Dar for my backups, and I haven't had that problem.

I checked my copies of documentation (a couple of years old), then checked current documentation at the Dar website. I can't find any option which allows one to include a filename in a backup, but not the contents of the file. It's possible to record directory names in the tree while excluding the files in the directory; but not possible to record the name of a file and not it's contents.

If the file is empty in the backup, it was empty when the backup was made.

You might try posting your questing to the Dar author.

mazinoz 07-02-2007 09:40 PM

Thanks for replying I don't remember any error messages because things seemed to be going ok I set up a cron job to enable automatic backups. When I think of things the next day I try to remember doing a restore. I should probably automate this as well.
So basically I am unaware of error messages.

As it was only a score of files affected, and most of my stuff is ok, I'll just let it go, but it was annoying as I lost some documentation information.

mazinoz 07-02-2007 09:46 PM

Sorry here is my Backups Script

# Relocate and Create Backups
#
rm /Backups/.Backups/Oldest/*.dar
mv /Backups2/.Previous/*.dar /Backups/.Backups/Oldest/
cd /root/.dar_backups/
mv /root/.dar_backups/Latest/*.dar /Backups2/.Previous/
cd /root/.dar_backups/Latest/
dar -c dell -R/ -z2 -s699M -X "dell*.*.dar" -X "*.iso" -P tmp -P proc -P sysfs -P usbfs -P ramfs -P rootfs -P subfs -P media -P devpts -P tmpfs -P sys -P dev -P Oldest -P Previous -P Latest

chrism01 07-03-2007 02:30 AM

You might want to make the script check the rtn (success/fail) codes ( aka $? ) of each of those cmds as they run .

billymayday 07-04-2007 12:51 AM

What is your directory structure under / ?

bigrigdriver 07-04-2007 01:14 AM

Here's my script for one of my partitions (I have one for each partition: some partitions change more often than others):
Quote:

/usr/bin/dar -c mnt/data/`date \+\%Y%m%d`ROOTbackup \
-v -b -p -R / bin dev etc lib media mnt \
opt root sbin var \
-D -y9 -m 1K -X "*~" -X ".*~" -X "*.bak" -X "*.*.dar" \
-X "lost+found" \
-P mnt/data -P dev/pts -P lost+found -P media/cdrom -P media/floppy \
-P media/zip -P data -P mnt/windows -P proc -P tmp -P var/cache \
-P var/lock -P var/log -P var/mail -P var/run -P var/spool -P var/tmp\
-Z "*.gz" -Z "*.tgz" -Z "*.bz2" -Z "*.zip" -Z "*.deb" -Z "*.rpm" \
-Z "*.bin" -Z "*.jpg" -Z "*.jpeg" -Z "*.mpg" -Z "*.mpeg" -Z "*.mp3" \
-Z "*.ogg" -Z "*.wav" -Z "*.gif" -Z "*.png" -Z "*.ZIP" -Z "*.Z" \
-Z "*.xpi"
Read the script with the Dar Tutorial in a console window, and you can work out what I've done here.

I stand by my original opinion: if the file is empty in the backup, it was empty when the backup was made.

Everytime I make a backup, I take the time to list the backup, and I do test restores of a few files to verify the files are complete.

I'm certain my use of the Dar system for backups works, because I managed to trash my SuSE 9.3 installation, and restored from backup (stored on another disk).


All times are GMT -5. The time now is 06:44 PM.