rsync: how to copy file that is not permissible

Discussion in 'HOWTO-Related Questions' started by nugroho2, Dec 5, 2008.

  1. nugroho2

    nugroho2 New Member

    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.
     
  2. sjau

    sjau Local Meanie Moderator

    not all files really exist... e.g. /proc just appears but they are not true files...
     
  3. nugroho2

    nugroho2 New Member

    Thanks for the fast reply.

    My code is something like this:
    and the failure is mostly caused by chgrp and chown, like this:

    How do you work around the problem?
     
  4. sjau

    sjau Local Meanie Moderator

    what filesystem is the ACERONE?
     
  5. nugroho2

    nugroho2 New Member

    Linpus, based on Fedora 8.
     
  6. sjau

    sjau Local Meanie Moderator

    but what filesystem is in place there?
     
  7. nugroho2

    nugroho2 New Member

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

    My code rsync the "/" folder. Perhaps that includes the sda2 ?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    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.
     
  9. nugroho2

    nugroho2 New Member

    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?
     
  10. geek.de.nz

    geek.de.nz New Member

    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... :)
     
  11. nugroho2

    nugroho2 New Member

    My method is Mike Rubel's that is also mentioned in Dirvish site. It works much the same. As such I believe it will give the same result.
     
  12. nugroho2

    nugroho2 New Member

    Sorry, everyone, I am a newbie. I have got the answer: I did not set the owner of the destination as root.
     

Share This Page