Re: du sparse vs sha256sum confusion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2025-05-08 at 22:22 -0700, ToddAndMargo via users wrote:
> On 5/8/25 5:43 PM, Samuel Sieb wrote:
> > On 5/8/25 5:22 PM, ToddAndMargo via users wrote:
> > > On 5/8/25 4:57 PM, Samuel Sieb wrote:
> > > > On 5/8/25 4:54 PM, ToddAndMargo via users wrote:
> > > > > Fedora 41
> > > > > borgbackup-1.4.1-1.fc41.x86_64
> > > > > 
> > > > > In my testing an hot to write up I made myself of borg
> > > > > backup, I found something confusing.
> > > > > 
> > > > > I backed up three file and restored them (somewhere else).
> > > > > The sha256sum matched the originals but the du's did not.
> > > > > What am I missing?
> > > > 
> > > > I'm guessing that the backup program doesn't handle sparse files.
> > > > 
> > > > The checksum will match because the empty space is zeroed either way.
> > > > 
> > > 
> > > Thank you!
> > > 
> > > My read is that if the check sum matches, the file is perfect.
> > > But, I wanted to double check in case I was missing something.
> > 
> > The file is equivalent.  It just takes up more disk space. :-)
> > 
> 
> 
> As a test, now that dump/restore is working again, I backed up
> a sparse file and restored:
> 
>         Sparse file backups and restored with dump/restore:
>             #  du --bytes *
>             104857600	sparseFile
>             104857600	sparseFile.orig
> 
>             # du --block-size=1 *
>             0	sparseFile
>             0	sparseFile.orig
> 
>             # sha256sum *
>   
> 20492a4d0d84f8beb1767f6616229f85d44c2827b64bdbfb260ee12fa1109e0e  sparseFile
>   
> 20492a4d0d84f8beb1767f6616229f85d44c2827b64bdbfb260ee12fa1109e0e 
> sparseFile.orig

> Borg is incapable of the same result.   And I am backing up
> a lot of qamu-kvm virtual drives.  They are sparse files and
> large.  If borg can not deal with sparse files, then it is not
> a good candidate for replacing dump/restore.  Bord
> will give back equivalent files that are much larger.

I don't run Borg on my VM images. If I want to back up a VM I'll use
the VM's own backup system internally. However this might be of
interest:

https://borgbackup.readthedocs.io/en/stable/deployment/image-backup.html

poc
-- 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux