Backup

2 views
Skip to first unread message

Napoleon M

unread,
Nov 6, 2023, 5:24:01 AM11/6/23
to GSLUG
Which program is best backup for filesystem, preservation of hard links metadata

dd
tar
rsync?

Anyone explain which is best in each case.

Thanks
Napoleon 

Ski Kacoroski

unread,
Nov 6, 2023, 7:03:34 AM11/6/23
to Napoleon M, GSLUG
I have used both successfully for soft and hard links.  One thing I found is the some file systems (e.g. fat32, some online services) don't support them so make sure you format the external ssd correctly.  If I have to back up to a system that doesn't support them, I have a simple shell script that lists all the links in a file which I backup so I can recreate them.  Just check the docs for tar and sync and verify you got what you expected.

Cheers,

Ski

--
--
--
GSLUG-general mailing list
https://gslug.org/wiki/Mailing_Lists
---
To unsubscribe from this group and stop receiving emails from it, send an email to gslug-genera...@aoeu.com.

Bri Hatch

unread,
Nov 6, 2023, 10:43:30 AM11/6/23
to Ski Kacoroski, Napoleon M, GSLUG
Backing up to what? Same disk? Secondary disk? External disk? Remote machine? Do you want a single copy or various historical versions?

If you want to be able to go 'back in time' then if you're using a snapshot-capable filesystem like zfs then you just make a snapshot of the whole fs with a single command and it's safe and available. Or you may be able to configure it automatically, e.g. with the zfs-auto-snapshot and you can have them happen magically for you. This would be most space efficient because you don't copy any data that hasn't changed.

If you're not on a snapshot-capable system and want something similar, then rsnapshot may be for you. It is magic around rsync that makes copies of files on a schedule, and tries to be space-efficient by using hard links where it can, so a file that has not changed is only present once in the backup. However a single bit flip in the file will mean an entire new copy will need to be made, so less efficient than a fs-level snapshot. rsnapshot could run locally, or to an external disk or other system entirely.

If you just want something quick-n-dirty, then rsync from your source to your dest will give you a good copy.

If you explain your use case more (why specifically are you interested in hard links - that's an implementation, not a goal) we may be able to help more.


"Life on Earth can't get more complex because that
would require engergy, and the sun doesn't exist."
--ZachWiener, sumarizing antievolutionist dogma

Napoleon M

unread,
Nov 6, 2023, 3:32:07 PM11/6/23
to GSLUG


On Mon, Nov 6, 2023 at 8:19 PM Napoleon M <napo...@gmail.com> wrote:
So I got a secondary 500GB SSD to backup my home/. My primary is a m.2 nvme partition. It has root + home default scheme. I posted a image of my screen as my system shuts down in an earlier email. "Failed to unmount /old root"

"Failed to unmount/oldroot/dev device or resource busy"

I was thinking that this meant some process was operating and preventing shutdown, so I went in to my .cache folder deleted a couple unused apps and my browser cache. Thinking that may be a good idea. I also was looking into other Ubuntu issues with shutdown and systems from a few years ago and recently. I may just reinstall that was the idea for the backup to use the second drive. My partition scheme on my main price is curious. I have about 2MB free space on the beginning of the drive and the end. /nvme0n1p1 is 522 MB FAT, 
/nvme0np2 is 4.3GB fat, the partition 3 is ext4 holds filesystem and home+ root - 991GB. Swap partition is partition 4 at 4.3 GB.


I was able to boot up a rescue disk to access everything, I try to fire up email from that if you want to know more like screen shots or attachments.

My only other option is to backup /home and reinstall then copy over the/home and try to make it seamless. 

Thank, 
Napo

Napoleon M

unread,
Nov 6, 2023, 3:44:38 PM11/6/23
to GSLUG
This is Disk and terminal from the /boot
Screenshot from 2023-11-06 20-42-05.png
Screenshot from 2023-11-06 20-42-10.png

Nimret Sandhu

unread,
Nov 6, 2023, 3:58:37 PM11/6/23
to Napoleon M, GSLUG
I back-up data across all my devices to the cloud (note we have many more computers than humans in our household :)

They have clients for the various OSes, devices, etc.

Nimret


--

Napoleon M

unread,
Nov 6, 2023, 5:12:23 PM11/6/23
to Nimret Sandhu, GSLUG
I can install fresh with the latest nvidia drivers, that may be what is causing the problem. The refresh install option is supposed to preserve my /home and install/remove everything else; all my snaps, flatpak, and user installed apt deb packages. I really don't want to reinstall everything and wish there is a different way. Someone mention I install separate to the other drive and copy over the files I want to have. Hence is tar or sync better across drives like that.  The other option is to repair and figure out why its broke, maybe a bad bootloader, bios, or kernel.

Napoleon M

unread,
Nov 6, 2023, 5:35:33 PM11/6/23
to Nimret Sandhu, GSLUG
my system wont shutdown because it is waiting for process systemd-udev, systemd-udevd

Napoleon M

unread,
Nov 6, 2023, 5:48:47 PM11/6/23
to Nimret Sandhu, GSLUG
Reply all
Reply to author
Forward
0 new messages