You are not logged in.
Pages: 1
I know it's easy as pie, also easy as pie is to mess things, so I'm trying to take measures in order to avoid scrambling it, specially when using rsync --delete.
So, to be extra safe, the better practice would be to mount source as read only, the problem is how do I mount my home partition as read only while the system is running. And no,I'm not going to boot the live cd only to set my home as read only.
Luckly I taken the precaution of havin all my .conf and .cache crap somewhere else, now the thing is how can I mount my home partition as read only while the system is in use?
I tried mount -o ro /dev/sdb4 /disks/somewhere_else
but:
mount: /disks/home: /dev/sdb4 already mounted on /home/human.
What a novelty! I was trying to mount my home twice and read only the second time.
The other solution is to run rsync as a user without write permission on sources, but I'm not sure how to do it.
Edit: I created the user rsync, the trouble is that if I run it as -AaX I will have the same trouble in destination next time. Any way of granting access to specific user by mount neverless what permissions are set?
Solved: mount -bind /home/user /somewhere_else
mount -o bind,ro,remount /somewhere_else
Last edited by Automath (2023-06-11 03:04:28)
Offline
You'd need to log out of any (non-root) user session to unmount /home (in order to remount 'ro').
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You'd need to log out of any (non-root) user session to unmount /home (in order to remount 'ro').
I'm almost sure, that if i try that as root in the tty I will have device in use error. Let me check. Anyway still not ellegant.
Edit: yep, destiny is busy...
Last edited by Automath (2023-06-11 02:40:53)
Offline
Post the exact error. If you've actually logged out of your user session, it should not be in use.
Anyway still not ellegant.
I never suggested it would be - but it's the question you asked. Unmounting your home partition just to do a backup seems silly to me.
Last edited by Trilby (2023-06-11 03:19:40)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Post the exact error. If you've actually logged out of your user session, it should not be in use.
Automath wrote:Anyway still not ellegant.
I never suggested it would be - but it's the question you asked. Unmounting your home partition just to do a backup seems silly to me.
So binding asread only is ok? I already done it anyway.
Offline
As an alternative, you could use a snapshot. My home partition is an LVM logical volume - my daily backup job takes a snapshot of it and makes an incremental backup from the snapshot.
Offline
Pages: 1