SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Exclude just files in a given path
Author Message
Post Exclude just files in a given path 
Hi everyone,

I'm using rsnapshot with satisfaction on a dozen of machines. My
approach is to use two configuration files, one for backing up
user data daily and the other one for backing up monthly the whole
machine installation, without any data.

When backing up the whole machine I set my generic excludes to
something like:

exclude /proc/*
exclude /sys/*
exclude /var/cache/*
exclude /var/log/*
exclude /tmp/*

and additionally I have rsync_long_args to exclude certain directories
based on that machine's specific duty (f.e. /var/www on webservers).

Now, I would like to retain the tree structure on those excluded path,
because program may expect them. Apache, for example, expects
/var/log/apache{,2}/ to be there and APT expects
/var/cache/apt/archives/.

A full machine restore could be problematic and laborious, requiring
too much babysitting after it.

So, my question is: is there a clean way to tell rsnapshot/rsync to
exclude just files in those directories, while keeping the separation
between generic excludes and machine's dependent ones?

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Exclude just files in a given path 
On Fri, Sep 23, 2011 at 5:22 AM, Paul Hills <paulhills99123 < at > gmail.com> wrote:
Hi everyone,

I'm using rsnapshot with satisfaction on a dozen of machines. My
approach is to use two configuration files, one for backing up
user data daily and the other one for backing up monthly the whole
machine installation, without any data.

When backing up the whole machine I set my generic excludes to
something like:

exclude /proc/*
exclude /sys/*
exclude /var/cache/*
exclude /var/log/*
exclude /tmp/*

and additionally I have rsync_long_args to exclude certain directories
based on that machine's specific duty (f.e. /var/www on webservers).

Now, I would like to retain the tree structure on those excluded path,
because program may expect them. Apache, for example, expects
/var/log/apache{,2}/ to be there and APT expects
/var/cache/apt/archives/.

A full machine restore could be problematic and laborious, requiring
too much babysitting after it.

So, my question is: is there a clean way to tell rsnapshot/rsync to
exclude just files in those directories, while keeping the separation
between generic excludes and machine's dependent ones?

Only by using an advance probe, doing "rsync -a --dry-run", to
generate a file and directory list to try to manipulate.

If you have specific directories like this to bring over, perhaps you
can use a "post" execution strip to aid in their sophistication?

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Exclude just files in a given path 
2011/9/24 Nico Kadel-Garcia <nkadel < at > gmail.com>:
On Fri, Sep 23, 2011 at 5:22 AM, Paul Hills <paulhills99123 < at > gmail.com> wrote:
[...]
So, my question is: is there a clean way to tell rsnapshot/rsync to
exclude just files in those directories, while keeping the separation
between generic excludes and machine's dependent ones?

Only by using an advance probe, doing "rsync -a --dry-run", to
generate a file and directory list to try to manipulate.

I found a fitting and simple solution, just use:

include /var/foo/bar/**/
exclude /var/foo/bar/**

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB