You are not logged in.

#1 2009-08-18 13:08:49

Fungyo
Member
Registered: 2009-04-13
Posts: 42

rsync ext4 to ext3 skipping directories

Hi,
I'm trying to backup my home drive to an external hdd. My home partition is ext4 with

/home ext4 defaults,noatime 0 1

in fstab and the external hdd is ext3 which i mount as

sudo mount /dev/sdb1 /mnt/backup/

i used the following rsync command:

rsync -aru --exclude 'chief/.VirtualBox' --exclude 'chief/htpc' --exclude 'chief/downloads' --exclude 'chief/Downloads' --exclude 'chief/software' --exclude 'chief/.programs' --exclude 'chief/movies' --exclude 'chief/.otherstuff' --exclude 'chief/.tmp' --exclude 'chief/.thumbnails' --exclude 'chief/.wine' /home/chief /mnt/backup/home-dir &> /dev/null

also tried without the -u option.
What I am finding is not all directories are being copied to the backup hdd.
For example, the entire .kde4 directory was skipped but running

rsync -aru .kde4/ /mnt/backup/home-dir/.kde4

copied everything without issues.

Any ideas on what's wrong here?

thanks.

Last edited by Fungyo (2009-08-18 13:09:30)

Offline

#2 2009-08-19 06:39:57

Fungyo
Member
Registered: 2009-04-13
Posts: 42

Re: rsync ext4 to ext3 skipping directories

Is it better to use cp for the first initial backup and then rsync for backing up what has changed?

Offline

#3 2009-08-19 09:15:48

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: rsync ext4 to ext3 skipping directories

Fungyo wrote:

Is it better to use cp for the first initial backup and then rsync for backing up what has changed?

You can do that if you like, (use "cp -a") but sticking at it and trying to figure out why rsync is excluding that directory needs to be done in any case. It won't magically start working if you've cp'd first.

I see no reason to think this is an ext4/ext3 issue. It's just an rsync config issue.

Offhand, I don't see what's wrong with your statement. I'm accustomed to using the "--relative" flag and then anchoring my excludes with a "/" at the front. I think your excludes will match anywhere in the tree you're copying, not just at the top of it. But this may not be giving you any problems.

Speculation: since you're using the "-u" flag, perhaps the first time around there already was a (newer) .kde directory at the dest, so it was skipped? And that rule doesn't apply when the two directories in question are the root source and root dest, as in your second rsync statement? You could test this by moving or deleting the .kde4 directory you've now created and try your first rsync again---if this diagnosis is right it should then work.

Offline

#4 2009-08-19 09:56:54

Fungyo
Member
Registered: 2009-04-13
Posts: 42

Re: rsync ext4 to ext3 skipping directories

Thanks Profjim. I think you might be right about the folder already being there. I am new to rsync and was playing around with it, trying to --exclude '/home/chief/downloads/' etc, but that wasn't working due to the / at the beginning and end, so I had to interrupt the process a few times. I also decided to restructure my backup folder and so moved a few directories before running rsync again.
Anyways, I found my backup drive was too small, purchased a new external drive, formatted with ext4 and (think) I have successfully rsync'd.

I didn't know about the --relative flag, will look into it.

Offline

Board footer

Powered by FluxBB