Dual boot - Sync *data* between environments?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
psklenar
Level 1
Level 1
Posts: 21
Joined: Sun Jan 06, 2019 2:30 pm

Dual boot - Sync *data* between environments?

Post by psklenar »

While I'm playing around testing a Win10/Mint 19.1 dual boot on an old laptop, I'm designing and preparing to implement dual boot on my main desktop. The *long* term goal is to replace Win10 but I expect it'll take a while before I'm comfortable uninstalling Win10 (actually, I expect to end up needing a minimal Win10 installation left to handle *some* games (e.g.; Mechwarrior 5 coming out in September :) ), but I hope to move 99% of my computer use over to the Linux side eventually).

So, for the time being (weeks, months, year?) while I'll be going back and forth between OS's I'd like to ensure that my *data* is the same on both environments. *Data* = documents, pictures, music, videos, save game files, etc. I've read enough of the *possible* risks of trying to just use the existing NTFS partition constantly from both environments that I bought another drive to hold a full copy of the *data*. Once I'm completely switched over to Linux (at least for day-to-day use), I'll reformat the original NTFS data drive to a linux filesystem and turn it into a TimeShift storage drive.

My question ... is rsync my best option for maintaining the NTFS and ext4 copies of the data in sync (copy files added to directories on the linux drive over to the windows drive, delete files deleted from directories on the linux drive from windows drive and visa versa windows drive to linux drive)? Or is there a better option given I'll be copying data only (not executables or dot files) between NTFS and ext4?

Thank you,
pat----
Hoser Rob
Level 16
Level 16
Posts: 6810
Joined: Sat Dec 15, 2012 8:57 am

Re: Dual boot - Sync *data* between environments?

Post by Hoser Rob »

psklenar wrote:
Thu Jan 17, 2019 9:39 am
... The *long* term goal is to replace Win10 but I expect it'll take a while before I'm comfortable uninstalling Win10 (actually, I expect to end up needing a minimal Win10 installation left to handle *some* games (e.g.; Mechwarrior 5 coming out in September :) ), but I hope to move 99% of my computer use over to the Linux side eventually)....
I think you're quite to not be in a rush to remove Windows, many newbies do it far too fast.

However, if you're into gaming, I wouldn't replace WIndows AT ALL. Linux gaming is a bit of a joke and I don't expect that to change soon (flame away, I don't give a flying frak). You're also right to want to use a 2nd HD for dual boot, this is the way to go, it's a lot more reliable.

However, I don';t think syncing your data between the 2 OSes is a good idea. Keep them separate. There are too many, so to speak, "undocumented features" in ntfs, which is largely also why a 2nd HD for dual boot is a good idea. As another example, Linux symlinks (which is what is being used when you right click a file in file mgr and it says "Link to ..." or similar) aren't supported in WIndows file formats, and symlinks are pretty common and useful.
User avatar
AndyMH
Level 13
Level 13
Posts: 4975
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Dual boot - Sync *data* between environments?

Post by AndyMH »

In my dual boot desktop I've got four drives:
  • An SSD for win - single partition for C:.
  • An SSD for mint - two partitions, one for root and the other /home. Running mint 19.0 so while I've got a swap partition, next time round, I wouldn't bother and let it use a swap file.
  • A HDD for data - formatted NFTS, single partition. In win this is D: and in mint I've got it mounted as /home/me/data. This is how I share data between the two OSs.
  • A HDD solely for backup - formatted ext4, single partition. This HDD is sat in a caddy, so removable.
Rsync is the back-end for a lot of the linux backup utilities, I use timeshift and backintime. Timeshift takes care of root, backintime backs up /home. As I've got the shared data drive mounted in /home, backintime backs this up as well. I've deliberately mounted win C: in mint as /home/me/winC, not because I ever write anything to it from mint, but because backtintime also backs that up.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
psklenar
Level 1
Level 1
Posts: 21
Joined: Sun Jan 06, 2019 2:30 pm

Re: Dual boot - Sync *data* between environments?

Post by psklenar »

Thank you both for your quick replies!
Hoser Rob wrote:
Thu Jan 17, 2019 10:02 am
However, if you're into gaming, I wouldn't replace WIndows AT ALL.
Hoser Rob,

Even if I'm only gaming 2-3 days a month?

AndyMH wrote:
Thu Jan 17, 2019 10:05 am
A HDD for data - formatted NFTS, single partition. In win this is D: and in mint I've got it mounted as /home/me/data. This is how I share data between the two OSs.
AndyMH,

So in terms of "Data" you haven't had/don't expect any issues reading/writing to documents, pictures, music, videos, save game files, etc. from both sides?

pat----
Kendoori
Level 4
Level 4
Posts: 443
Joined: Thu Jul 09, 2009 12:51 pm
Location: Sanibel, FL USA

Re: Dual boot - Sync *data* between environments?

Post by Kendoori »

If it's any help this is my setup.

I wanted to keep Windows 10 intact and easily move back and forth. I have one large 1 TB SSD that had Windows 10 on it. I had broken off my "DATA" into a separate partition in Windows already ("E" drive). In the screenshot it is labeled "GDrive." sda6 and sda7 are Mint.

Image

The key thing to making this work, is to make sure you turn off fast startup. This article describes this: https://itsfoss.com/solve-ntfs-mount-pr ... dual-boot/

One other part of my workflow is that I use Google Drive to sync the "DATA" partition with a 3rd party utility InSync. I had previously had this on Windows, but now I do the NTFS drive from Mint.
psklenar
Level 1
Level 1
Posts: 21
Joined: Sun Jan 06, 2019 2:30 pm

Re: Dual boot - Sync *data* between environments?

Post by psklenar »

Kendoori wrote:
Thu Jan 17, 2019 4:56 pm
The key thing to making this work, is to make sure you turn off fast startup.
Kendoori,

Thank you! I just checked and Fast Startup was enabled.

pat----
User avatar
MrEen
Level 22
Level 22
Posts: 15097
Joined: Mon Jun 12, 2017 8:39 pm

Re: Dual boot - Sync *data* between environments?

Post by MrEen »

psklenar wrote:
Thu Jan 17, 2019 5:05 pm
Kendoori wrote:
Thu Jan 17, 2019 4:56 pm
The key thing to making this work, is to make sure you turn off fast startup.
Kendoori,

Thank you! I just checked and Fast Startup was enabled.

pat----
Also be aware that a Windows Update may turn it back on down the road.
ajgringo619
Level 8
Level 8
Posts: 2120
Joined: Thu Mar 01, 2018 8:36 pm
Location: San Diego, California, USA

Re: Dual boot - Sync *data* between environments?

Post by ajgringo619 »

I would recommend using unison to sync your Windows/Mint data. Here's a copy of the script I use to sync the folders I want:

Code: Select all

#!/bin/bash

# This script syncs data between my Linux & Windows installations

WIN_ROOT="/media/Windows-C/Users/me"

sudo mount /dev/sda4 /media/Windows-C                                                      # Windows 10 C drive
unison -batch -perms 0 ~/Documents/ $WIN_ROOT/Documents/
unison -batch -perms 0 ~/Downloads/ $WIN_ROOT/Downloads/
unison -batch -perms 0 ~/Music/ $WIN_ROOT/Music/
unison -batch -perms 0 ~/Pictures/ $WIN_ROOT/Pictures/
unison -batch -perms 0 ~/Saved\ Games/ $WIN_ROOT/Saved\ Games/
sudo umount /dev/sda4
The best part about using this setup is that if I download/change/delete files on either system, the changes will be propagated properly.

In order to get this to work, I had to add sudo permissions for the mount/umount commands (add using visudo:

Code: Select all

me        ALL=(ALL:ALL) NOPASSWD: /bin/mount, /bin/umount
Last edited by ajgringo619 on Thu Jan 17, 2019 6:15 pm, edited 1 time in total.
Mint 20 XFCE [kernel 5.4.0-54-generic]
Ryzen 7 2700X Eight-Core w/16 GB RAM
GTX 1070 w/8GB RAM [Folding]
GTX 1050Ti w/4GB RAM [Nvidia v455.38]
Image
psklenar
Level 1
Level 1
Posts: 21
Joined: Sun Jan 06, 2019 2:30 pm

Re: Dual boot - Sync *data* between environments?

Post by psklenar »

ajgringo619 wrote:
Thu Jan 17, 2019 5:20 pm
I would recommend using unison to sync your Windows/Mint data. ...
ajgringo619,

Thank you, this sounds like exactly what I was hoping to find!

pat----
User avatar
AndyMH
Level 13
Level 13
Posts: 4975
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Dual boot - Sync *data* between environments?

Post by AndyMH »

So in terms of "Data" you haven't had/don't expect any issues reading/writing to documents, pictures, music, videos, save game files, etc. from both sides
No, when I first started with mint that was how I had my laptop setup and never had any problems. Back then I used Tbird as my mail client (now use evolution) and I had it installed in both win and mint, both pointing at the same mail folder - no problems.

If you go down this route, just need to be a bit careful with the fstab entry in mint for the NTFS partition. Not on my desktop at the moment or I would post the entry.

If you are planning starting from scratch I'd install win and mint (both have to be the same) in legacy mode (MBR - max 4 primary partitions, max partition size 2TB). I think it is easier than UEFI with less potential problems (he says this not having done a UEFI install :) ).
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate
Post Reply

Return to “Newbie Questions”