BackupPC-users

Re: [BackupPC-users] oh my ... changing backupdirectory

2012-02-13 17:00:13
Subject: Re: [BackupPC-users] oh my ... changing backupdirectory
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: korndoerfer AT crelux DOT com, "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 13 Feb 2012 16:57:59 -0500
Ingo P. Korndoerfer wrote at about 11:04:27 +0100 on Monday, February 13, 2012:
 > hello,
 > 
 > i have been going around in circles and pretty much grazed all i could
 > find on google and then finally found a way to
 > get this to work, and though it might be worth communicating this, so it
 > can maybe get included in the wiki ?

Why would we want to include such an absolutely brain-dead and
dangerous workaround to be in the wiki?  All you did was find a way to
destroy all notions of security and permissions on the backup
partition. Hey, I can't make a link so let me just run "chmod ugo+rwx"
on the entire backup tree. That has to be perhaps the absolutely
stupidest and most dangerously ignorant idea I have ever seen.
Please don't go near the wiki and please don't suggest workarounds
that you yourself don't understand lest you confuse some other newbie.

 > 
 > i have succesfully installed backuppc under ubuntu and can connect and
 > all is fine.
 > 
 > except, i want my backups on a usb mounted external disk and then could
 > not start the backuppc server anymore
 > here is what i did:
 > 
 > i followed the instructures here:
 > 
 > http://sourceforge.net/apps/mediawiki/backuppc/index.php?title=Change_archive_directory#Changing_the_storage_location_of_the_BackupPC_pool
 > 
 > i.e.
 > 
 > sudo /etc/init.d/backuppc stop
 > 
 > cp -dpR /var/lib/backuppc/. /mnt/backups1/backuppc

Why not just do cp -a?

 > mv /var/lib/backuppc /var/lib/backuppc.orig
 > ln -s /mnt/backups1/backuppc /var/lib/backuppc
 > 
 > sudo /etc/init.d/backuppc start
 > 
 > and get the famous "can not create test hardlink" error.

One potential issue might be that the external drive is not mounted as
root and hence only has your user permissions -- so in particular the
backuppc user cannot access it.


 > the solution after a lot of trying was to
THE FOLLOWING IS NOT THE SOLUTION in any intelligent sense of the word!
 > 
 > cd /mnt/backups1
 > sudo su
 > chmod -R ugo+rwx backupppc

This is in general a *very* bad idea.
You have just made your backups readable, writable, and executable to
all. All the files are now executable.

Why don't you try to figure out the problem rather than just hitting
it all with a sledgehammer by setting all perms to maximally
permissive?

Why don't you try making a test link yourself as user backuppc and see
where and why it fails?

 > 
 > and then finally
 > 
 > sudo /etc/init.d/backuppc start
 > 
 > would work.
 > 
 > i am still lacking a grasp of what the real problem was and what would
 > have been the proper way to go about this.
You lack a total understanding of Linux security permissions.

 > the permissions of the original installation and the copied installation
 > (which i am using now via soft link) look like this:
 > 
 > original install in /var/lib:
 > 
 > drwxr-x---  7 backuppc backuppc 4096 Feb 13 09:37 .
 > drwxr-xr-x 63 root     root     4096 Feb 13 10:23 ..
 > drwxr-x---  2 backuppc backuppc 4096 Feb 13 10:10 cpool
 > drwxr-x---  2 backuppc backuppc 4096 Feb 13 10:13 log
 > drwxr-x---  3 backuppc backuppc 4096 Feb 13 10:10 pc
 > drwxr-x---  2 backuppc backuppc 4096 Jun 30  2011 pool
 > drwxr-x---  2 backuppc backuppc 4096 Jun 30  2011 trash
 > 
 > after copy to external disk (could not start backuppc server with this,
 > but why. the permissions are all the same):
 > 
 > drwxr-x--- 7 backuppc backuppc 4096 Feb 13 09:37 .
 > drwxrwxrwx 5 ingo     ingo     4096 Feb 13 10:59 ..
 > drwxr-x--- 2 backuppc backuppc 4096 Feb 13 10:10 cpool
 > drwxr-x--- 2 backuppc backuppc 4096 Feb 13 10:13 log
 > drwxr-x--- 3 backuppc backuppc 4096 Feb 13 10:10 pc
 > drwxr-x--- 2 backuppc backuppc 4096 Jun 30  2011 pool
 > drwxr-x--- 2 backuppc backuppc 4096 Jun 30  2011 trash
 > 
 > after chmod (now working)
 > 
 > drwxrwxrwx 7 backuppc backuppc 4096 Feb 13 09:37 .
 > drwxrwxrwx 4 ingo     ingo     4096 Feb 13 09:44 ..
 > drwxrwxrwx 2 backuppc backuppc 4096 Feb 13 10:54 cpool
 > drwxrwxrwx 2 backuppc backuppc 4096 Feb 13 10:54 log
 > drwxrwxrwx 3 backuppc backuppc 4096 Feb 13 10:54 pc
 > drwxrwxrwx 2 backuppc backuppc 4096 Jun 30  2011 pool
 > drwxrwxrwx 2 backuppc backuppc 4096 Jun 30  2011 trash
 > 
 > is it the parent directory permissions that are messing the thing up ?
 > 
 > thanks for any comments
 > 
 > cheers
 > 
 > ingo
 > 
 > 
 > ----------------------------------------------------------------------
 > 
 > +----------------------------------------------------------------------+
 > | Ingo Korndoerfer <korndoerfer AT crelux DOT com>     Work: +49 89 
 > 700760210 |
 > | Head of Crystallography                       Fax:  +49 89 700760222 |
 > | Crelux GmbH; Crystallography                                         |
 > | Am Klopferspitz 19a                                                  |
 > | Martinsried, 82152 Germany                                           |
 > +----------------------------------------------------------------------+
 > 
 > ----------------------------------------------------------------------
 > ------------------------------------------------------------------------------
 > Try before you buy = See our experts in action!
 > The most comprehensive online learning library for Microsoft developers
 > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 > Metro Style Apps, more. Free future releases when you subscribe now!
 > http://p.sf.net/sfu/learndevnow-dev2
 > 
 > ----------------------------------------------------------------------
 > _______________________________________________
 > BackupPC-users mailing list
 > BackupPC-users AT lists.sourceforge DOT net
 > List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > Wiki:    http://backuppc.wiki.sourceforge.net
 > Project: http://backuppc.sourceforge.net/

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>