Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th December 2008, 17:56
nugroho2 nugroho2 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default rsync: how to copy file that is not permissible

I have run incremental backup using rsync successfully after reading from one site but I could not copy many system files because "permission denied" etc. So I just exclude the folders through the excluded files.
Does this mean that rsync has that limitation? I had run as superuser.
I have read the manual, but still could not find the way to copy all system files using rsync. I have used dd command successfully to do that.
Reply With Quote
Sponsored Links
  #2  
Old 5th December 2008, 18:49
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,138
Thanks: 4
Thanked 52 Times in 48 Posts
Default

not all files really exist... e.g. /proc just appears but they are not true files...
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #3  
Old 6th December 2008, 02:37
nugroho2 nugroho2 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for the fast reply.

My code is something like this:
Quote:
$RSYNC \
-av --delete --delete-excluded \
--exclude-from="$EXCLUDES" \
/lib/ $SNAPSHOT/lib ;
and the failure is mostly caused by chgrp and chown, like this:

Quote:
rsync: chgrp "/media/ACERONE/lib/modules/2.6.23.9lw/usb" failed: Operation not permitted (1)
rsync: chgrp "/media/ACERONE/lib/modules/2.6.23.9lw/usb/media" failed: Operation not permitted (1)
rsync: chown "/media/ACERONE/lib/rtkaio" failed: Operation not permitted (1)
rsync: chown "/media/ACERONE/lib/security" failed: Operation not permitted (1)
rsync: chown "/media/ACERONE/lib/security/pam_filter" failed: Operation not permitted (1)
How do you work around the problem?
Reply With Quote
  #4  
Old 6th December 2008, 08:39
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,138
Thanks: 4
Thanked 52 Times in 48 Posts
Default

what filesystem is the ACERONE?
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #5  
Old 6th December 2008, 11:34
nugroho2 nugroho2 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Linpus, based on Fedora 8.
Reply With Quote
  #6  
Old 6th December 2008, 18:20
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,138
Thanks: 4
Thanked 52 Times in 48 Posts
Default

but what filesystem is in place there?
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
Reply With Quote
  #7  
Old 7th December 2008, 06:11
nugroho2 nugroho2 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

/dev/sda1 ... ext2
/dev/sda2 ... linux-swap

My code rsync the "/" folder. Perhaps that includes the sda2 ?
Reply With Quote
  #8  
Old 7th December 2008, 14:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

No, sda2 is your swap partition - you don't have to rsync that. It is used by your computer if there's not enough RAM.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
nugroho2 (8th December 2008)
  #9  
Old 8th December 2008, 06:21
nugroho2 nugroho2 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

The source is ext2, the destination is also ext2. Perhaps this is related to group and owner of destination folder? How should I get around this?
Reply With Quote
  #10  
Old 8th December 2008, 10:09
geek.de.nz geek.de.nz is offline
Member
 
Join Date: Feb 2006
Posts: 65
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to geek.de.nz Send a message via MSN to geek.de.nz
 
Cool dirvish

Hi,

Why don't you use a backup system like dirvish? It has served me well for quite some time now.

Otherwise (or also with dirvish) you will need to exclude device and virtual files like those, maybe in a exclude file (e.g. rsync_exclude.txt):

Code:
/path/to/file/from/directory/rsync/is/run
path/to/file/which/is/in/any/sub/directory
path/to/directory/
/path/to/directory/
path/to/directory/** #to exclude every file under directory
/other/pattern/???directorybeginningwithany3characters/and/fileendingwithanything*
+ path/to/file/to/keep/excluded/before/or/after
# ...
# unfortunately no regular expressions...
and then run with
Code:
rsync --exclude-from=rsync_exclude.txt ...
You can look up the dirvish docs, but i found rsync quite challenging to get it to do exactly what i want...
__________________
Always mention at least your distribution/version! You can add it in your signature if you don't want to always type it. ;-)

Distributions:
Ubuntu 5.10 with custom kernel (2.6.16-suspend2),
Debian Sarge 3.1 and Etch

Please submit your ISP or Webhost to (free)
http://www.ihostnz.com
Reply With Quote
Reply

Bookmarks

Tags
backup, incremental, rsync

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix delivery problem erebus Installation/Configuration 7 26th June 2014 14:33
update failed loge Installation/Configuration 6 1st December 2007 17:53
Chroot SSH + ISPConfig Norman Installation/Configuration 27 26th March 2007 03:40
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
64-bit Debian 3.1 Install Issue naruto Installation/Configuration 14 5th September 2006 04:12


All times are GMT +2. The time now is 00:30.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.