SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
have experimented with rsync a long time ago and have just returned to it for backups. It occurred to me that it is possible, unless rsync is 'smart' somehow, to recursively copy it's own backup.
I mean for instance if I want to backup the whole drive, sda1, to say sdb1 and I have a mount point for the backup such as /mnt/sda_sdb_backup. When the rsync gets to the /mnt/sda_sdb_backup dir would it just recursively copy itself to sdb1??? So on sdb you would end up with two copies, one on / (root) and one on /mnt (if it was big enough, or you would end up filling the drive and rsync would exit with an error). Or is rsync smarter than that? Last time I seem to recall adding /mnt to the exclude list.
As far as I know you need to exclude and rsync is not smart enough to do that automatically. Everything I have found by searching the web points to rsync not having that functionality.
have experimented with rsync a long time ago and have just returned to it for backups. It occurred to me that it is possible, unless rsync is 'smart' somehow, to recursively copy it's own backup.
I mean for instance if I want to backup the whole drive, sda1, to say sdb1 and I have a mount point for the backup such as /mnt/sda_sdb_backup. When the rsync gets to the /mnt/sda_sdb_backup dir would it just recursively copy itself to sdb1??? So on sdb you would end up with two copies, one on / (root) and one on /mnt (if it was big enough, or you would end up filling the drive and rsync would exit with an error). Or is rsync smarter than that? Last time I seem to recall adding /mnt to the exclude list.
Thanks, BashTin.
Besides using the '--exclude=/mnt/*' option there is also the 'x' option which limits the rsync source to a single file system.
Here is an example of copying the root file system to a file system mounted on /a14:
Thanks for the replies. Just wanted it clarified with people who are more knowledgeable.
comet.berkeley thanks for that. Will look into the x option as I don't want it copying the /boot partition over either, it might just be what is needed. /boot is in my exclude list but this is an interesting alternative.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.