Page: 1, 2  Next

sleekmason
Status: Interested
Joined: 03 Dec 2008
Posts: 15
Location: NW Arkansas
Reply Quote
Hi. I am having issues with the excludes list, mainly the home lists, and may need clarification later for the root list, but think I'll probably be able to figure that out.

In a nutshell, adding /home, or /home/, or /home/sleek, or anything else I can think of will not allow /home to be excluded. I am adding this to both exclude lists, home and rsync home.
This is after trying direct paths (i.e /home/sleek/Desktop) first in the same manner. I decided I would see if /home itself would be excluded when the complete paths to items I wish excluded did not work.

Maybe I am completely screwing up the syntax now that it is rsync? don't know.
*note, when I changed /home/ to /home in rbxi-values, I could keep /home from being backed up, but still would not allow more complete paths to being used.
Back to top
sleekmason
Status: Interested
Joined: 03 Dec 2008
Posts: 15
Location: NW Arkansas
Reply Quote
just noticed I'm using .06 . . Don't know if the same issue will crop up or not, I will change it now and report back.
Back to top
sleekmason
Status: Interested
Joined: 03 Dec 2008
Posts: 15
Location: NW Arkansas
Reply Quote
Same problem. No exclusion for the items I add. Here is a partial list giving an example. I put the same thing in the excludes-home.txt. Something I'm not reading correctly?


### cache ###
- **/.mozilla/**/Cache/

### sockets ###
+ **/*.sock/
- **/*.sock
+ **/socket/
- **/socket

### trash ###
- **/.Trash-*
- **/lost+found

### User Data ###
/home/sleek/.xine
/home/sleek/.VirtualBox
/home/sleek/.xarchive
/home/sleek/.thumbnails
/home/sleek/.qt
/home/sleek/.purple
/home/sleek/.pulse
/home/sleek/.mcop
:: Quote ::

Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
<update>
Sorry, I see you got caught by the TOTALLY non-intuitive path bug.

rsync has a truly horrible way to handle paths, this is why you always run the job with the new -r (set --dry-run), or by hard coding in --dry-run, in rsync. This lets you see the actual paths your excludes are using.

You need to use this, not the full path:
:: Code ::
/sleek/.xine
/sleek/.VirtualBox
/sleek/.xarchive
/sleek/.thumbnails
/sleek/.qt
/sleek/.purple
/sleek/.pulse
/sleek/.mcop

Why? Because the first / does NOT mean start at the system root in this case, which is one of the very dumbest things I've seen coders do re decision making, but rather, it means: ^, that is, / means, at the backup job root, ie, /home, start the exclude/includes with this path.

So this results in the following exclude, say for .qt:
Exclude rule for /home
Exclude directory in home sleek/.qt
Making the full exclude path be: /home + /sleek/.qt

However, there's an even easier way to handle it, and this will also exclude all other user accounts on your machine:

:: Code ::
- **/.xine
- **/.VirtualBox
- **/.xarchive
- **/.thumbnails
- **/.qt
- **/.purple
- **/.pulse
- **/.mcop


But be careful with ** wild card rules, you could also make this:

:: Code ::
- /*/.xine
- /*/.VirtualBox
- /*/.xarchive
- /*/.thumbnails
- /*/.qt
- /*/.purple
- /*/.pulse
- /*/.mcop

This would exclude all user directories in /home

I like to start the rules with an explicit '- ' or '+ ' ( - and a space, or plus and a space, - and + being first on the line)

** matches anything, of any length, in the path, including /, but * matches only directory names, not slashes.

So what does this mean your excludes were telling rsync? This:

exclude: /home/home/sleek/.qt which it was dutifully doing, and had you had such a directory, you can rest assured that rsync would have excluded it as you told it to do.

This was one of the trickiest things to learn for me with these rules.

I'll add an update to the readme-rbxi.txt file, and a short note on the main two rsync excludes, about this, so others can avoid your error.

I did exactly the same thing, and it took repeated and boring tests until I realized how rsync was constructing its paths.

This is a pain, and I have no idea how they made such a silly decision, but they did, they made /, which means root directory in all unix, mean ^, start in backup path assigned with the following (everything after the first /, that is)

Unrelated but still interesting things to know
A few notes, all things I just discovered during painful testing:

rdiff-backup does NOT support comments in exclude/include files. That's why the rsync excludes have comments and the rdiff-backup excludes don't.

You have to make sure your excludes don't conflict as well.

For example, if you are backing up your /home data in a separate job, then you'd just use, for rsync, in the exclude-root-rsync.txt file:

/home

This will exclude /home and all its subdirectories.

My guess is you are setting two exclude rules in two files that conflict, but I need details, like the total excludes you're using, and which backups you're running, ie, root, home, data 1, and so on.

To make clear: in no case would home and root backup go to the SAME destination directory, with the single exception of a Clone job of /home to root.

So if you are backing up everything into one directory, you should turn off the /home backup stuff, and run only /, with /home excluded.

Further, the way that includes work in this is somewhat confusing, but I think I finally figured it out, see for example the var/cache stuff for an example:

:: Code ::
### cache ###
- **/.mozilla/**/Cache/
+ /var/cache/apt/archives/*/
+ /var/cache/apt/archives/*/**
- /var/cache/apt/archives/*
+ xover-cache/
- **/xover-cache/*


rsync handles these things far better than rdiff-backup, which has some major weaknesses, especially with backing up empty directories.

The above would back up /.mozilla/**/Cache/ directory, but NOT its contents.

And it would backup all directories, and their files, in /var/cache/apt/archives but nothing in /var/cache/apt/archives/ that is a file.

I've tested this fairly heavily, so my guess is that you have conflicting exclude rules.

Let me know the complete details of your backup job defaults then we can look further, also paste in here the verbatim /home and / excludes.
Back to top
sleekmason
Status: Interested
Joined: 03 Dec 2008
Posts: 15
Location: NW Arkansas
Reply Quote
*edit. Feel free to delete this entry, as it no longer pertains.

Here is the info you requested, as well as usage.
Basically, I am just backing up certain /home files, like music and such, and a few files in / as well.

They are going to /media/disk1part1/backup-rs/home, and /media/disk1part1/backup-rs/root-sda1.
Currently, ALL of '/home' gets backed up, and only 'boot' in / gets backed up.

I am aware that the excludes for 'root' are not accurate as I have not had time to figure them out yet, but will post what I have in case I am creating some error without knowing it.

I will post all four of the excludes lists, though I believe I only need the rsync excludes?

excludes-home-rsync.txt
:: Code ::

### cache ###
- **/.mozilla/**/Cache/

### sockets ###
+ **/*.sock/
- **/*.sock
+ **/socket/
- **/socket

### trash ###
- **/.Trash-*
- **/lost+found

### User Data ###
/home/sleek/.xine
/home/sleek/.VirtualBox
/home/sleek/.xarchive
/home/sleek/.thumbnails
/home/sleek/.qt
/home/sleek/.purple
/home/sleek/.pulse
/home/sleek/.mcop
/home/sleek/.miro
/home/sleek/.macromedia
/home/sleek/.local
/home/sleek/.kde
/home/sleek/.java
/home/sleek/.hydrogen
/home/sleek/.hplip
/home/sleek/.gstreamer-0.10
/home/sleek/.gnome2
/home/sleek/.gnome2_private
/home/sleek/.gimp-2.4
/home/sleek/.gconfd
/home/sleek/.gconf
/home/sleek/.fontconfig
/home/sleek/.dbus
/home/sleek/.compose-cache
/home/sleek/.cache
/home/sleek/.adobe
/home/sleek/.AbiSuite
/home/sleek/Desktop
/home/sleek/Incomplete
/home/sleek/irclogs
/home/sleek/none
/home/sleek/dwhelper
/home/sleek/.xauthority
/home/sleek/.Xauthority
/home/sleek/.recently-used.xbel
/home/sleek/.recently-used.xbel.B8JGKU
/home/sleek/.pulse-cookie
/home/sleek/.profile
/home/sleek/.mcoprc
/home/sleek/.ICEauthority
/home/sleek/.gtk-bookmarks
/home/sleek/.gksu.lock
/home/sleek/.fonts.conf
/home/sleek/.dmrc
/home/sleek/.DCOPserver_sid__0
/home/sleek/.DCOPserver_sid_:0
/home/lost+found
/home/.Trash-0
/home/sleek/.old bash list of commands
/home/sleek/.installed program names
/home/sleek/.bash_logout
/home/sleek/.xsession-errors


excludes-home.txt
:: Code ::

- **/.mozilla/**/Cache/*

- **/.Trash-*
- **/lost+found

/home/sleek/.xine
/home/sleek/.VirtualBox
/home/sleek/.xarchive
/home/sleek/.thumbnails
/home/sleek/.qt
/home/sleek/.purple
/home/sleek/.pulse
/home/sleek/.mcop
/home/sleek/.miro
/home/sleek/.macromedia
/home/sleek/.local
/home/sleek/.kde
/home/sleek/.java
/home/sleek/.hydrogen
/home/sleek/.hplip
/home/sleek/.gstreamer-0.10
/home/sleek/.gnome2
/home/sleek/.gnome2_private
/home/sleek/.gimp-2.4
/home/sleek/.gconfd
/home/sleek/.gconf
/home/sleek/.fontconfig
/home/sleek/.dbus
/home/sleek/.compose-cache
/home/sleek/.cache
/home/sleek/.adobe
/home/sleek/.AbiSuite
/home/sleek/Desktop
/home/sleek/Incomplete
/home/sleek/irclogs
/home/sleek/none
/home/sleek/dwhelper
/home/sleek/.xauthority
/home/sleek/.Xauthority
/home/sleek/.recently-used.xbel
/home/sleek/.recently-used.xbel.B8JGKU
/home/sleek/.pulse-cookie
/home/sleek/.profile
/home/sleek/.mcoprc
/home/sleek/.ICEauthority
/home/sleek/.gtk-bookmarks
/home/sleek/.gksu.lock
/home/sleek/.fonts.conf
/home/sleek/.dmrc
/home/sleek/.DCOPserver_sid__0
/home/sleek/.DCOPserver_sid_:0
/home/lost+found
/home/.Trash-0
/home/sleek/.old bash list of commands
/home/sleek/.installed program names
/home/sleek/.bash_logout
/home/sleek/.xsession-errors


excludes-root.txt
:: Code ::

- /tmp/*
- /var/tmp/*
- /tmpfs/*

- /proc/*
- /sys/*
- /cdrom*/*

- **/.mozilla/**/Cache/*
+ /var/cache/apt/archives/*/
+ /var/cache/apt/archives/partial
+ /var/cache/apt/archives/*/*
- /var/cache/apt/archives/
- **/xover-cache/*

- **/.Trash-*
- **/lost+found

- /home/*/*
- /media/*/*
- /mnt/*/*
/tmp
/proc
/sys
/home
/media
+ /usr/share/themes
+ /usr/share/icons
+ /usr/share/audacious
+ /usr/share/fluxbox
+ /etc/apt
+ /etc/X11/xorg.conf
+ /etc/fstab
+ /etc/sudoers
+ /etc/sysctl.conf
+ /boot/grub/menu.lst
/usr
/var
/etc
/dev
/bin
/lib
/lost+found
/mnt
/none
/opt
/proc
/root
/sbin
/selinux
/srv
/sys
/tmp
/initrd.img
/vmlinuz


excludes-root-rsync.txt
:: Code ::

### tmp ###
- /tmp/**
- /var/tmp/**
+ /tmpfs/
- /tmpfs/**

### transient ###
- /proc/**
- /sys/**
- /cdrom*/**

### cache ###
- **/.mozilla/**/Cache/
+ /var/cache/apt/archives/*/
+ /var/cache/apt/archives/*/**
- /var/cache/apt/archives/*
+ xover-cache/
- **/xover-cache/*

### trash ###
- **/.Trash-*
- **/lost+found

### sockets ###
+ **/*.sock/
- **/*.sock
+ **/socket/
- **/socket

### user / mount data ###
/home/*/**
/media/*/**
/mnt/*/**
/tmp
/proc
/sys
/home
/media
+ /usr/share/themes
+ /usr/share/icons
+ /usr/share/audacious
+ /usr/share/fluxbox
+ /etc/apt
+ /etc/X11/xorg.conf
+ /etc/fstab
+ /etc/sudoers
+ /etc/sysctl.conf
+ /boot/grub/menu.lst
/usr
/var
/etc
/dev
/bin
/lib
/lost+found
/mnt
/none
/opt
/proc
/root
/sbin
/selinux
/srv
/sys
/tmp
/initrd.img
/vmlinuz


For now, what remains after the excludes is all I need, though thast may change.

< Edited by sleekmason :: Dec 20, 08, 16:53 >

Back to top
sleekmason
Status: Interested
Joined: 03 Dec 2008
Posts: 15
Location: NW Arkansas
Reply Quote
Your too quick:) I'll let you know after I have changed all the goods. Thank you for the update.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Version 2.2.1, updated to fix an rdiff backup bug, and also updated the readme and excludes-home-rsync.txt file to better illustrate how to create the rules.

The reason, by the way, that this is confusing, is that the rules all seem to work as intended in /, but if you think about it, that's because the rules all start in / in that backup, not in /home, but it's easy to miss that point.

But thanks for the feedback, I consider this a bug since it wasn't at all clear or intuitive, and the files are suppposed to explain this more clearly.

2.2.1 can just be updated via rbxi -U

Unless you want the new data files, which do not get updated.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
By the way, if you want to exclude everything except the includes you listed, just do this:

:: Code ::
# this will include these directories and all their contents
+ /something/**
+ /anotherthing/**
+ /yetanotherthing/**
## and this super bomb exclude excludes everything else
## include always overrides excludes
- **


I'm leaving your sample, because it gives a good way to show yet another thing you can do with excludes.

By the way, don't feel bad about not getting excludes, figuring out and testing them were about 1/3 of my total time on this rewrite, which is now at about 1 week.

By the way, when you use [ code ] (spaces so it doesn't execute), make sure to close each code block with [/ code ]
Back to top
sleekmason
Status: Interested
Joined: 03 Dec 2008
Posts: 15
Location: NW Arkansas
Reply Quote
Heh, works like a charm:) Very nice, and fast. I like having all of the extra abilities. I'm hoping to expand my uses for this real soon.

Doing 'includes' rather than excludes is a nice tip as well. I also am enjoying the verbose mode. Already caught something trying to weasel in.
Thank you for all of your effort. Nice work indeed.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
thanks, I appreciate you testing it and giving me feedback, that caught a big documentation weakness, which I've now patched in 2.2.1.

Also fixed a few bugs, so rbxi -U to latest if you don't have 2.2.1 now.

Also, the update notification option, user selected in rbxi-values, is nice, and seems to be working well. If you set:

B_UPDATE_NOTIFIER='true'
it switches on the notifier, which shows if there is a new version when there is one, and just the current version of yours if there isn't.
Back to top
Display posts from previous:   
Page: 1, 2  Next
All times are GMT - 8 Hours