FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-06-2008, 11:28 AM
Haines Brown
 
Default backup script changes permissions

I'be brought up my backup script for discussion before, and folks where
helpful in solving a problem, but the solution created another. Now all
files backed up have their ownerships changed to me, brownh:brownh.

Here's the old script, which had the problem that output was going to a
mail message that quickly exceeded system limits, and then caused the
backup process to terminate:

find / -print | egrep -v "^/media|^/proc|^/sys|^/mnt" | cpio -pdmuv
/media/mirror/"$dirName" > 2>&1 | cat -vt

Here's the new script which only sends an error message:

find / -print | egrep -v "^/media|^/proc|^/sys" | cpio -pdmuv
/media/mirror/"$dirName" 2>&1 | cat -vT >/home/brownh/.backup.log

However, it seems to convert ownership of all files backed up to
brownh:brownh.

--

Haines Brown, KB1GRM





--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-06-2008, 12:09 PM
Kevin Mark
 
Default backup script changes permissions

On Sun, Apr 06, 2008 at 07:28:51AM -0400, Haines Brown wrote:
> I'be brought up my backup script for discussion before, and folks where
> helpful in solving a problem, but the solution created another. Now all
> files backed up have their ownerships changed to me, brownh:brownh.
>
> Here's the old script, which had the problem that output was going to a
> mail message that quickly exceeded system limits, and then caused the
> backup process to terminate:
>
> find / -print | egrep -v "^/media|^/proc|^/sys|^/mnt" | cpio -pdmuv
> /media/mirror/"$dirName" > 2>&1 | cat -vt
>
> Here's the new script which only sends an error message:
>
> find / -print | egrep -v "^/media|^/proc|^/sys" | cpio -pdmuv
> /media/mirror/"$dirName" 2>&1 | cat -vT >/home/brownh/.backup.log
>
> However, it seems to convert ownership of all files backed up to
> brownh:brownh.
>
> --

I did:
cpio --help

and the only thing that stuck out was this option:
--no-preserve-owner Do not change the ownership of the files

so maybe add this and use:
cpio -pdmuv --no-preserve-owner

hth,
K
--
| .'`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal |mysite.verizon.net/kevin.mark/|
| `. `' Operating System | go to counter.li.org and |
| `- http://www.debian.org/ | be counted! #238656 |
| my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian! |
|_______ Unless I ask to be CCd, assume I am subscribed _______|


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-06-2008, 12:20 PM
Osamu Aoki
 
Default backup script changes permissions

On Sun, Apr 06, 2008 at 07:28:51AM -0400, Haines Brown wrote:
> I'be brought up my backup script for discussion before, and folks where
> helpful in solving a problem, but the solution created another.

I did not read it...

> Now all
> files backed up have their ownerships changed to me, brownh:brownh.
>
> Here's the old script, which had the problem that output was going to a
> mail message that quickly exceeded system limits, and then caused the
> backup process to terminate:

Is this cron script? Why "mail"?

> find / -print | egrep -v "^/media|^/proc|^/sys|^/mnt" | cpio -pdmuv
> /media/mirror/"$dirName" > 2>&1 | cat -vt

I do not understand first ">"

> Here's the new script which only sends an error message:
>
> find / -print | egrep -v "^/media|^/proc|^/sys" | cpio -pdmuv
> /media/mirror/"$dirName" 2>&1 | cat -vT >/home/brownh/.backup.log
>
> However, it seems to convert ownership of all files backed up to
> brownh:brownh.
>From what account did you run this/
* root from real root
* root from sudo
* account brownh

If last, files are owned by brownh. That is how it sould be.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-06-2008, 01:30 PM
Noah Slater
 
Default backup script changes permissions

On Sun, Apr 06, 2008 at 07:28:51AM -0400, Haines Brown wrote:
> I'be brought up my backup script for discussion before, and folks where
> helpful in solving a problem, but the solution created another. Now all
> files backed up have their ownerships changed to me, brownh:brownh.

Why don't you use a prebuilt package such as backup2l?

--
Noah Slater <http://bytesexual.org/>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 10:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org