SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
directory entry "snapshot_root" vanishes
Author Message
Post directory entry "snapshot_root" vanishes 
Hallo,

there may be a small error in "rsnapshot", in the definition of
"exclude_path":

if the target directory ("snapshot_root") is "/srv/backup" then it
generates

--exclude=srv/backup

and therefore even the directory entry "/srv/backup" vanishes in the
backup.

I'd prefer something like

--exclude=srv/backup/*

then the directory itself is copied but nothing inside this directory.

Background: on some of my machines "/srv/backup" is a symlink to some
other place, and when I restore the full backup then this symlink isn't
restored.

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post directory entry "snapshot_root" vanishes 
On Thu, Jul 28, 2011 at 7:44 AM, Helmut Hullen <Hullen < at > t-online.de> wrote:
Hallo,

there may be a small error in "rsnapshot", in the definition of
"exclude_path":

if the target directory ("snapshot_root") is "/srv/backup" then it
generates

       --exclude=srv/backup

and therefore even the directory entry "/srv/backup" vanishes in the
backup.

I'd prefer something like

       --exclude=srv/backup/*

then the directory itself is copied but nothing inside this directory.

Background: on some of my machines "/srv/backup" is a symlink to some
other place, and when I restore the full backup then this symlink isn't
restored.

Then that's what *you* need, based on the existing syntax of the
"rsync" command, not an an rsnapshot flaw. And you might actually
want:

--exclude=/srv/backup/

Why don't you try that and see if it does what you want?

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post directory entry "snapshot_root" vanishes 
Hallo, Nico,

Du meintest am 28.07.11:

there may be a small error in "rsnapshot", in the definition of
"exclude_path":

if the target directory ("snapshot_root") is "/srv/backup" then it
generates

       --exclude=srv/backup

Then that's what *you* need, based on the existing syntax of the
"rsync" command, not an an rsnapshot flaw. And you might actually
want:

--exclude=/srv/backup/

Why don't you try that and see if it does what you want?

The "rsnapshot" program generates

       --exclude=srv/backup

I've done nothing.

Just search for "exclude_path =".

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post directory entry "snapshot_root" vanishes 
Hallo, Helmut,

Du meintest am 28.07.11:

there may be a small error in "rsnapshot", in the definition of
"exclude_path":

if the target directory ("snapshot_root") is "/srv/backup" then it
generates

--exclude=srv/backup

and therefore even the directory entry "/srv/backup" vanishes in the
backup.

Maybe I've found the solution, but I'm no perl crack.

Searching in "/usr/bin/rsnapshot" for "exclude_path" shows as second hit

$exclude_path = $config_vars{'snapshot_root'};

Changing it to

$exclude_path = $config_vars{'snapshot_root'} . '/';

seems to work as wanted, without unwanted side effects.
The directory "snapshot_root" itself is now part of the backup, but it's
content is not copied.


Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
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