SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
no_create_root doesnt work the way I think it should
Author Message
Post no_create_root doesnt work the way I think it should 
I'm backing up to an external, encrypted, USB hard drive from cron. I
have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root will
get filled up by the backup, written to a directory /media/Maxtor-1, so
it appears to me that it is creating the snapshot_root. This happens
when the ext hard drive doesn't get mounted for some reason. Am I
misunderstanding no_create_root or is this a bug?

I'm using rsnapshot 1.3.0 on ubuntu 10.04




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
Am 09.05.2012 06:11, schrieb brad:
I'm backing up to an external, encrypted, USB hard drive from cron. I
have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root will
get filled up by the backup, written to a directory /media/Maxtor-1, so
it appears to me that it is creating the snapshot_root. This happens
when the ext hard drive doesn't get mounted for some reason. Am I
misunderstanding no_create_root or is this a bug?
Hallo Brad,

no_create_root means that if your rsnapshots root directory is
/media/Maxtor-1, that this directory will not be created if it is
missing. In your case, the directory is always present. So if your
external drive is not mounted, the directory exists anyway and rsnapshot
starts to work. one solution would be to use a subfolder on your
external drive "rsnapshots" or "backups" as root
(media/Maxtor-1/backups). So if the drive is not mounted, the subfolder
is not found and no_create_root works as aspected. Another solution
would be an udev rule, which created the directory /media/Maxtor-1 when
the external drive is pluged in and deletes the folder when the device
was removed, so the directory does not exist when the drive is not present.

Regards Ronny

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
Hallo, brad,

Du meintest am 08.05.12:

I'm backing up to an external, encrypted, USB hard drive from cron.
I have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root
will get filled up by the backup, written to a directory
/media/Maxtor-1, so it appears to me that it is creating the
snapshot_root. This happens when the ext hard drive doesn't get
mounted for some reason. Am I misunderstanding no_create_root or is
this a bug?

"Ronny" has told the most informations. He propose a udev rule for
checking wether the target is mounted; I work with a "wrapper" script
which first tests wether the target is mounted and then calls
"rsnapshot".

And for USB devices I prefer working with "LABEL" for checking the right
target.

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
Hallo, brad,

Du meintest am 08.05.12:

I'm backing up to an external, encrypted, USB hard drive from cron.
I have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root
will get filled up by the backup, written to a directory
/media/Maxtor-1, so it appears to me that it is creating the
snapshot_root. This happens when the ext hard drive doesn't get
mounted for some reason. Am I misunderstanding no_create_root or is
this a bug?

"Ronny" has told the most informations. He proposes a udev rule for
checking wether the target is mounted; I work with a "wrapper" script
instead which first tests wether the target is mounted and then calls
"rsnapshot".

And for USB devices I prefer working with "LABEL" for checking the right
target.

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
You should use a directory which is only on your external disk, but the
one you are using is around all the time as the mount point. Also, I
would use a shell script and check the return code from mount anyway.

brad <bradhaack < at > fastmail.us> wrote:

I'm backing up to an external, encrypted, USB hard drive from cron. I
have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root will
get filled up by the backup, written to a directory /media/Maxtor-1, so
it appears to me that it is creating the snapshot_root. This happens
when the ext hard drive doesn't get mounted for some reason. Am I
misunderstanding no_create_root or is this a bug?

I'm using rsnapshot 1.3.0 on ubuntu 10.04




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
covici < at > ccs.covici.com

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
On Tue, May 08, 2012 at 10:11:27PM -0600, brad wrote:

I'm backing up to an external, encrypted, USB hard drive from cron. I
have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root will
get filled up by the backup, written to a directory /media/Maxtor-1, so
it appears to me that it is creating the snapshot_root. This happens
when the ext hard drive doesn't get mounted for some reason. Am I
misunderstanding no_create_root or is this a bug?

It's neither Smile

What you're misunderstanding is what happens when a volume is mounted.

For a volume to be mounted, the place in the filesystem that it is to be
mounted at must already exist as a directory. So, at some point that
directory had to get created. Consumerish OSes like Ubuntu and are often
user-friendly enough to make that transparent, by silently creating the
directory for you on demand, and removing it afterwards. However, those
operations are not atomic with the mount and unmount, so there is a
brief period of time where the directory exists but the volume isn't
mounted. If during that period anything gets put in the directory, it
won't be removed, and the directory will then exist for ever until you
manually remove it. And if it's already there, then rsnapshot will
happily use it.

--
David Cantrell | Godless Liberal Elitist

EINE KIRCHE! EIN KREDO! EIN PAPST!

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
On Wed, May 09, 2012 at 07:26:14AM +0200, Ronny wrote:

no_create_root means that if your rsnapshots root directory is
/media/Maxtor-1, that this directory will not be created if it is
missing. In your case, the directory is always present. So if your
external drive is not mounted, the directory exists anyway and rsnapshot
starts to work. one solution would be to use a subfolder on your
external drive "rsnapshots" or "backups" as root
(media/Maxtor-1/backups). So if the drive is not mounted, the subfolder
is not found and no_create_root works as aspected.

To me, this simple solution (use a sub-directory as the snapshot root,
not the mount point itself) is the best. It also means you don't end
up with a lost+found directory inside your snapshot root.

--
___________________________________________________________________________
David Keegel <djk < at > cyber.com.au> Cyber IT Solutions Pty. Ltd.
http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post no_create_root doesnt work the way I think it should 
Thanks to all who have commented. I turned off the hard drive &
rebooted & the directory does not exist right now, so I think David's
observation is what has happened. It seems like this happens when I log
in at the same time that cron runs rsnapshot. It sounds like just
creating a Backup directory on the device and using that as root will be
sufficient?


On Wed, 2012-05-09 at 12:21 +0100, David Cantrell wrote:
On Tue, May 08, 2012 at 10:11:27PM -0600, brad wrote:

I'm backing up to an external, encrypted, USB hard drive from cron. I
have:
snapshot_root /media/Maxtor-1/
no_create_root 1

The hard drive gets mounted as /media/Maxtor-1. Occasionally root will
get filled up by the backup, written to a directory /media/Maxtor-1, so
it appears to me that it is creating the snapshot_root. This happens
when the ext hard drive doesn't get mounted for some reason. Am I
misunderstanding no_create_root or is this a bug?

It's neither Smile

What you're misunderstanding is what happens when a volume is mounted.

For a volume to be mounted, the place in the filesystem that it is to be
mounted at must already exist as a directory. So, at some point that
directory had to get created. Consumerish OSes like Ubuntu and are often
user-friendly enough to make that transparent, by silently creating the
directory for you on demand, and removing it afterwards. However, those
operations are not atomic with the mount and unmount, so there is a
brief period of time where the directory exists but the volume isn't
mounted. If during that period anything gets put in the directory, it
won't be removed, and the directory will then exist for ever until you
manually remove it. And if it's already there, then rsnapshot will
happily use it.




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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