How to full backup and restore only filled Ubuntu desktop?
by maybeJosiah from LinuxQuestions.org on (#6HN3Y)
Hello. I have an Ubuntu 22.04.3 desktop with Ubuntu Pro Lenovo Thinkpad T460 and would like a full backup that only holds filled space that I can do a full restore from. I have tried partition image for like my Ubuntu partition and that tries to make an image with all space including empty space. That is impractical for me. I have figured a way to have all timestamps recorded with a script. With that I could use rsync and an ext4 USB to back up like fully if not fully. It would be from / to USB and I mostly know how to do from computer to USB. Like my problem comes about by group and owner of USB and how do I get all, as in no thing excluded, things back to like my computer. I do not know if I could access all including root directories. I think I can but am unsure.
With that I am also unsure if rsync would overwrite like my USB restoring unless I do not specify --delete and that could leave mass of unwanted files. I could rsync from a bootable USB and have both computer and USB separate allowing easy transfer except I do not know if I can access all files on that USB from a bootable USB. Like my bootable USB is an Ubuntu 22.04.2 desktop USB.
I could also copy as nobody/nogroup to that USB and should be able to access all files on that USB with a bootable USB with that. Like my problem with that occurs with resetting group/owner. I can store group/owner as a file but would I be able to set it again?
I have set forth three possible methods of full backup that would be acceptable to me if I could resolve at least one problem with each. All backup tools I know of leave out something like created at timestamps or something so I am trying to make like my own backup and restore solution. backing up is not like my problem, it is restoring. Can anyone help with this? I would probably use an ext4 USB. All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.
With that I am also unsure if rsync would overwrite like my USB restoring unless I do not specify --delete and that could leave mass of unwanted files. I could rsync from a bootable USB and have both computer and USB separate allowing easy transfer except I do not know if I can access all files on that USB from a bootable USB. Like my bootable USB is an Ubuntu 22.04.2 desktop USB.
I could also copy as nobody/nogroup to that USB and should be able to access all files on that USB with a bootable USB with that. Like my problem with that occurs with resetting group/owner. I can store group/owner as a file but would I be able to set it again?
I have set forth three possible methods of full backup that would be acceptable to me if I could resolve at least one problem with each. All backup tools I know of leave out something like created at timestamps or something so I am trying to make like my own backup and restore solution. backing up is not like my problem, it is restoring. Can anyone help with this? I would probably use an ext4 USB. All as per one might be maybe or might not be maybe, maybe or maybe not, maybe.