LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 03-04-2023, 11:47 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 14,887

Rep: Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060
Rsync for backing up windows?


I must confess to having a pre-installed windows here . With the deals available from local pc builders, I saved more than I lost by letting it exist. There's nothing installed. So I boot it periodically, update it, shut it down, and back up to usb. But now look
Code:
root@Ebony:~# cd /mnt/dvd/Ebony/win11
root@Ebony:/mnt/dvd/Ebony/win11# rsync -avc --delete /win11 . && sync
sending incremental file list

<After it completes>

bash-5.1$ sudo du -sh /win11 /mnt/hd/Ebony/win11  
47G	/win11
57G	/mnt/hd/Ebony/win11
That rsync command should give me exact copies = equally sized copies? Not so, it seems. Anyone know why?
 
Old 03-04-2023, 01:37 PM   #2
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 2,972

Rep: Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735
Quote:
Originally Posted by business_kid View Post
That rsync command should give me exact copies = equally sized copies? Not so, it seems. Anyone know why?
Because the Windows uses its kind of symbolic and hard links on its NTFS partitions, which NTFS symbolic and hard links aren't so properly interpreted by Linux itself, no matter if it's Slackware, Ubuntu or RHEL.

I for one, I will strongly recommend you to use for a Windows backup the native tool: Windows Backup.

Anyway, I do NOT believe that Windows backups are on any way related to Slackware - same behavior you will get in Ubuntu, for example.

Last edited by LuckyCyborg; 03-04-2023 at 02:04 PM.
 
Old 03-04-2023, 01:43 PM   #3
baumei
Member
 
Registered: Feb 2019
Location: USA; North Carolina
Distribution: Slackware 15.0 (replacing 14.2)
Posts: 331

Rep: Reputation: 107Reputation: 107
Over the years I have seen instances where the disk-usage for a particular file and its copy was different on two different hard-drives. In the instances I saw, the hard-drives/partitions were configured with different block sizes.
 
Old 03-04-2023, 01:55 PM   #4
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 396

Rep: Reputation: 457Reputation: 457Reputation: 457Reputation: 457Reputation: 457
rsync should have logging options that will tell you if it fails to handle a given file. You'll probably want to send the output to a txt file and then look through it for any warnings or errors.
 
Old 03-04-2023, 02:13 PM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 14,887

Original Poster
Rep: Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060
Quote:
Originally Posted by LuckyCyborg View Post
Because the Windows uses its kind of symbolic and hard links on its NTFS partitions, NTFS which symbolic and hard links aren't so properly interpreted by Linux itself, no matter if it's Slackware, Ubuntu or RHEL.

I for one, I will strongly recommend you to use for a Windows backup the native tool: Windows Backup.

Anyway, I do NOT believe that Windows backups are on any way related to Slackware - same behavior you will get in Ubuntu, for example.
Thanks for the replies. That Windows Backup, I take it is a windows program. I'll look it up tmw. Does is back up all these farty 'recovery & whatnot' partitions?
Code:
sudo gdisk -l /dev/nvme0n1

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  EFI system partition
   2          206848          239615   16.0 MiB    0C01  Microsoft reserved ...
   3          239616       531958412   253.5 GiB   0700  Basic data partition
   4       531959808       533118975   566.0 MiB   2700  
   5       533121024       534145023   500.0 MiB   8300  boot
   6       534145024       659974143   60.0 GiB    8300  root
   7       659974144       999170047   161.7 GiB   8300  home
   8       999170048      1000212479   509.0 MiB   2700
What's disk type 2700 anyhow?

@baumei: Yeah, the block sizes would be off - I hadn't thought of that.
 
Old 03-04-2023, 02:31 PM   #6
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,051

Rep: Reputation: 805Reputation: 805Reputation: 805Reputation: 805Reputation: 805Reputation: 805Reputation: 805
Quote:
Originally Posted by business_kid View Post
Code:
rsync -avc --delete /win11 .
Quote:
Originally Posted by LuckyCyborg View Post
Because the Windows uses its kind of symbolic and hard links on its NTFS partitions, which NTFS symbolic and hard links aren't so properly interpreted by Linux itself
Even in Linux, that rsync command breaks hard links, and uses extra space because of that. Add this:
Code:
--hard-links, -H         preserve hard links
You might need this, too:
Code:
--sparse, -S             turn sequences of nulls into sparse blocks
 
Old 03-04-2023, 03:29 PM   #7
babam
LQ Newbie
 
Registered: Aug 2021
Distribution: Porteus, ZorinOS
Posts: 28

Rep: Reputation: Disabled
Quote:
Originally Posted by LuckyCyborg View Post
Because the Windows uses its kind of symbolic and hard links on its NTFS partitions, which NTFS symbolic and hard links aren't so properly interpreted by Linux itself, no matter if it's Slackware, Ubuntu or RHEL.
What if using ntfs3 (not fuse), does it support NTFS symbolic and hard links?
 
Old 03-04-2023, 03:51 PM   #8
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 2,972

Rep: Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735
Quote:
Originally Posted by business_kid View Post
Thanks for the replies. That Windows Backup, I take it is a windows program. I'll look it up tmw. Does is back up all these farty 'recovery & whatnot' partitions?
Yeah, the Windows Backup is integrated in (and shipped by) Microsoft Windows.

HOWEVER, because I for one usually I backup only my data, I have no idea if Windows Backup can do backups also on the special Windows partitions AND you did NOT asked about a FULL Windows backup on your OP post.

Please be kind to ask on the Windows forums about the full system backup solutions available on the wild.

Anyway, I am quite confident that your tentative rsync backups of Windows are dead data, because I do NOT believe that rsync can restore the boot functionality on Windows and its recovery system, from scratch - i.e. deleting the Windows partitions then later restoring it full from your rsync backups.

AGAIN, this thread of yours has NOTHING to do with Slackware, please be kind to ask the moderators to move it in an appropriate forum.

Last edited by LuckyCyborg; 03-04-2023 at 04:02 PM.
 
Old 03-04-2023, 03:56 PM   #9
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 2,972

Rep: Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735Reputation: 2735
Quote:
Originally Posted by babam View Post
What if using ntfs3 (not fuse), does it support NTFS symbolic and hard links?
It doesn't (yet?) and this NTFS3 it's even worse from this POV.

Last edited by LuckyCyborg; 03-04-2023 at 03:58 PM.
 
Old 03-04-2023, 08:09 PM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 3,943
Blog Entries: 7

Rep: Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188
IME, it is a waste of time backing up the Windows OS because you won't be able to restore it... Windows doesn't work that way. You can't just copy files back and expect Windows to work.

I'd say it's far better to run a Samba file share from Linux, use it for files & documents from within Windows, then use rsync to back that up.

You can also get versioning with a simple script called rsnapshot: https://slackbuilds.org/repository/15.0/misc/rsnapshot/.
 
Old 03-05-2023, 01:38 AM   #11
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: slackware...
Posts: 570

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Been using Acronis for decades... if asked, it will make a backup that can be restored to bare metal.

Not free, of course.
 
Old 03-05-2023, 03:38 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 19,905

Rep: Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740Reputation: 6740
Yes, never ever use linux to backup windows and/or ntfs based filesystem. But you can backup your valuable personal data and files.
From my side I would prefer to reinstall windows (and linux too) in case of a serious trouble and reinstall all the required software. So Actually I would never backup an OS.
 
Old 03-05-2023, 03:48 AM   #13
keithpeter
Member
 
Registered: Nov 2015
Location: 52:30N 1:55W
Distribution: Slackware 14.2 and Current
Posts: 292

Rep: Reputation: Disabled
I've sometimes used clonezilla to back up a Windows 7 hard drive to an external usb hard drive. Clonezilla can do individual partitions as well. I successfully restored the image back to the same hard drive in a laptop.

Edit: I copied the user files to an external drive as well

Last edited by keithpeter; 03-05-2023 at 03:55 AM. Reason: add copying user files
 
Old 03-05-2023, 04:51 AM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 14,887

Original Poster
Rep: Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060Reputation: 2060
Quote:
Originally Posted by LuckyCyborg
Please be kind to ask on the Windows forums about the full system backup solutions available on the wild.
Yes, this has morphed well away from Slackware and rsync. I also note that windows doesn't restore like Linux. I actually don't have data on windows to back up! I told folks I didn't use it.

Last edited by business_kid; 03-05-2023 at 04:55 AM.
 
Old 03-05-2023, 06:36 AM   #15
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 3,943
Blog Entries: 7

Rep: Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188Reputation: 2188
Quote:
Originally Posted by business_kid View Post
I actually don't have data on windows to back up! I told folks I didn't use it.
Then why are you backing it up? What is the purpose of this thread?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Rsync OK for backing up windows 10? business_kid Linux - General 9 06-13-2022 11:00 AM
backing up to the net with ftp or rsync rblampain Linux - General 2 04-27-2006 12:40 AM
rsync and backing up danimalz Linux - Software 12 10-24-2005 12:01 PM
backing up remote folder with rsync and ssh ohcarol Linux - Software 6 01-03-2005 12:43 AM
RSync or another way? Backing Up Off-site. kemplej Linux - Software 0 08-19-2004 04:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 09:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration