Rainer Stengele
2003-Oct-30 00:17 UTC
AW: trying to figure out how the --delete option works.
Add this: --delete-excluded See the manual. Rainer -----Urspr?ngliche Nachricht----- Von: rsync-bounces+rsync=diplan.de@lists.samba.org [mailto:rsync-bounces+rsync=diplan.de@lists.samba.org]Im Auftrag von Mandrake Pe Gesendet: Mittwoch, 29. Oktober 2003 13:33 An: rsync@lists.samba.org Betreff: trying to figure out how the --delete option works. I use this comand to back up my entirely drive to a second drive. Because the second drive is smaller I have excluded my movies directory. I also excluded the /mnt/ diectory, becous I dont want to back up the backup. This part works just fine. It's the --delete option I cant get to work. I want rsync to delete files on the backup(destination) drive, that I have deleted or moved on the souce drive. Therefore I added the --delete option, but it doesent work for me. the files and directories tht I deleted still exists on the backup, and the files and directories that I moved are duplicaded on the backup. Is there anyone who can help me out. Here is the comand I use: rsync -av --exclude "/**/movies/" --exclude "/mnt/" --delete / /mnt/backup/backup /Pedro -- L?s om f?rf?ljelsen av Falun Gong- ut?vare i Kina: http://www.falungonginfo.net Read about the persecution of Falun Gong- practitioners in China: http://www.faluninfo.net -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Thank you for your answer, but i'ts not about the excluded files. Sorry if I was unclear about that. This is what the man rsync says about the delete option: "--delete This tells rsync to delete any files on the receiving side that aren?t on the sending side." (This is exactly what I want it to do) " Files that are excluded from transfer are excluded from being deleted unless you use ??delete?excluded." (I dont need this option yet) "This option has no effect if directory recursion is not selected." (I really dont know what this means. Perhaps this is where my comand fails?) "This option can be dangerous if used incorrectly! It is a very good idea to run first using the dry run option (?n) to see what files would be deleted to make sure important files aren?t listed." " If the sending side detects any IO errors then the deletion of any files at the destination will be automatically disabled. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side causing a massive deletion of files on the destination. You can override this with the ??ignor" /Pedro -----------------------------------------------------------------------------------------------------> Add this: > > --delete-excluded > > See the manual. > > Rainer >-------------------------------------------------------------------------------------------------------> I use this comand to back up my entirely drive to a second drive. Because > the second drive is smaller I have excluded my movies directory. I also > excluded the /mnt/ diectory, becous I dont want to back up the backup. This > part works just fine. > > It's the --delete option I cant get to work. I want rsync to delete files > on the backup(destination) drive, that I have deleted or moved on the souce > drive. Therefore I added the --delete option, but it doesent work for me. > > the files and directories tht I deleted still exists on the backup, and the > files and directories that I moved are duplicaded on the backup. > > Is there anyone who can help me out. > > > Here is the comand I use: > rsync -av --exclude "/**/movies/" --exclude "/mnt/" --delete / > /mnt/backup/backup > > > /Pedro > -- > > > L?s om f?rf?ljelsen av Falun Gong- > ut?vare i Kina: > http://www.falungonginfo.net > > Read about the persecution of Falun Gong- > practitioners in China: > http://www.faluninfo.net-- L?s om f?rf?ljelsen av Falun Gong- ut?vare i Kina: http://www.falungonginfo.net Read about the persecution of Falun Gong- practitioners in China: http://www.faluninfo.net
This was the problem. There were some IO errors reading some files from the /proc/ directory, and then rsync won't delete any files at all. From the man: --delete If the sending side detects any IO errors then the deletion of any files at the destination will be automatically disabled. This is to prevent temporary filesystem failures (such as NFS errors) on the sending side causing a massive deletion of files on the destination. You can override this with the ??ignore? errors option. Thank you anyway for helping me to keep trying. /Pedro> Add this: > > --delete-excluded > > See the manual. > > Rainer > > -----Urspr?ngliche Nachricht----- > Von: rsync-bounces+rsync=diplan.de@lists.samba.org > [mailto:rsync-bounces+rsync=diplan.de@lists.samba.org]Im Auftrag von > Mandrake Pe > Gesendet: Mittwoch, 29. Oktober 2003 13:33 > An: rsync@lists.samba.org > Betreff: trying to figure out how the --delete option works. > > > I use this comand to back up my entirely drive to a second drive. Because > the second drive is smaller I have excluded my movies directory. I also > excluded the /mnt/ diectory, becous I dont want to back up the backup. This > part works just fine. > > It's the --delete option I cant get to work. I want rsync to delete files > on the backup(destination) drive, that I have deleted or moved on the souce > drive. Therefore I added the --delete option, but it doesent work for me. > > the files and directories tht I deleted still exists on the backup, and the > files and directories that I moved are duplicaded on the backup. > > Is there anyone who can help me out. > > > Here is the comand I use: > rsync -av --exclude "/**/movies/" --exclude "/mnt/" --delete / > /mnt/backup/backup > > > /Pedro > -- > > > L?s om f?rf?ljelsen av Falun Gong- > ut?vare i Kina: > http://www.falungonginfo.net > > Read about the persecution of Falun Gong- > practitioners in China: > http://www.faluninfo.net-- L?s om f?rf?ljelsen av Falun Gong- ut?vare i Kina: http://www.falungonginfo.net Read about the persecution of Falun Gong- practitioners in China: http://www.faluninfo.net