[SOLVED] Creative Solutions to use Sync.com with Linux OS
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
[SOLVED] Creative Solutions to use Sync.com with Linux OS
Hey folks,
Find myself in a less than ideal situation and looking for creative ideas & workarounds!
BACKSTORY
A few days before I had my Linux come-to-Jesus moment, I researched, selected, and PAID for a year on sync.com.
Sync.com is actually the perfect solution in my household for us to sync, backup, and share files, but alas post epiphany I switched OS from Windows to Linux Mint Cinnamon 21.3 Edge which means that sync.com is no longer compatible with my system. To be specific, there is no desktop function to automatically sync files within that folder. In every other way my life has become magnificent in this new OS environment, no regrets.
CURRENT WORKFLOW
I'm working on my backup workflow, which includes;
System backups:
- Timeshift (mostly installed & setup). Currently this is set to daily, keeping 1, weekly, keeping 5, and monthly, keeping 2. I appreciate this is on the high side of scheduling, but as I am completely new to (and obsessed & excited about) Linux Mint, I am making changes to system & settings hourly. I'll dial it down once I have things working the way I'd like.
- Rescuezilla (considering using this, but is lower on my list to implement)
Personal backups:
- FreeFileSync to mirror /media/tara/Data (/dev/sda1). I am manually mirroring this drive (which has 2TB capacity but is currently at about 125GB) to an external hard drive (almost) daily.
- Sync.com currently keep photos in the vault here, and have shared files with my husband that I'd like to access (but can use their web panel if needed).
DESIRED WORKAROUND
- I'd like to periodically backup the Data drive (mentioned above) to Sync.com. Its' about 125GB at the moment, though obviously will continue to grow. I'm not a huge user of large data files (like photos and videos) on that drive.
- Please don't suggest another cloud based solution!
- I feel like using something like syncthing as an intermediate step might help? using another device? maybe even husbands PC?
- I could maybe use the web panel? But don't want to do a full upload everytime.
- I live in Australia where our national broadband network is trash, and also in my suburb have variable internet speed from "I'd rather stab my eye with a fork" to "huh, this kind of feels like I imagine it actually should".
- I don't want to setup a partition with a Windows OS. Windows is dead to me.
- I fundamentally believe that everything is possible and it just requires a little lateral /creative thinking.
Got any obvious solutions I've missed? Or clever hacks? Or genius suggestions?
TIA
Honestly, I feel like I have all the required moving parts but the pieces haven't quite gelled for me yet.
Find myself in a less than ideal situation and looking for creative ideas & workarounds!
BACKSTORY
A few days before I had my Linux come-to-Jesus moment, I researched, selected, and PAID for a year on sync.com.
Sync.com is actually the perfect solution in my household for us to sync, backup, and share files, but alas post epiphany I switched OS from Windows to Linux Mint Cinnamon 21.3 Edge which means that sync.com is no longer compatible with my system. To be specific, there is no desktop function to automatically sync files within that folder. In every other way my life has become magnificent in this new OS environment, no regrets.
CURRENT WORKFLOW
I'm working on my backup workflow, which includes;
System backups:
- Timeshift (mostly installed & setup). Currently this is set to daily, keeping 1, weekly, keeping 5, and monthly, keeping 2. I appreciate this is on the high side of scheduling, but as I am completely new to (and obsessed & excited about) Linux Mint, I am making changes to system & settings hourly. I'll dial it down once I have things working the way I'd like.
- Rescuezilla (considering using this, but is lower on my list to implement)
Personal backups:
- FreeFileSync to mirror /media/tara/Data (/dev/sda1). I am manually mirroring this drive (which has 2TB capacity but is currently at about 125GB) to an external hard drive (almost) daily.
- Sync.com currently keep photos in the vault here, and have shared files with my husband that I'd like to access (but can use their web panel if needed).
DESIRED WORKAROUND
- I'd like to periodically backup the Data drive (mentioned above) to Sync.com. Its' about 125GB at the moment, though obviously will continue to grow. I'm not a huge user of large data files (like photos and videos) on that drive.
- Please don't suggest another cloud based solution!
- I feel like using something like syncthing as an intermediate step might help? using another device? maybe even husbands PC?
- I could maybe use the web panel? But don't want to do a full upload everytime.
- I live in Australia where our national broadband network is trash, and also in my suburb have variable internet speed from "I'd rather stab my eye with a fork" to "huh, this kind of feels like I imagine it actually should".
- I don't want to setup a partition with a Windows OS. Windows is dead to me.
- I fundamentally believe that everything is possible and it just requires a little lateral /creative thinking.
Got any obvious solutions I've missed? Or clever hacks? Or genius suggestions?
TIA
Honestly, I feel like I have all the required moving parts but the pieces haven't quite gelled for me yet.
Last edited by TaraThomasNow on Mon Mar 18, 2024 11:15 pm, edited 1 time in total.
Re: Creative Solutions to use Sync.com with Linux OS
Perhaps I am missing something here? Why not just setup a smb share on your computer on your local network (home network) ?Sync.com is actually the perfect solution in my household for us to sync, backup, and share files
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
Re: Creative Solutions to use Sync.com with Linux OS
Can you help me understand what that is? And how it allows me to back my data up to Sync.com?
Re: Creative Solutions to use Sync.com with Linux OS
Samba is the software. For short its a SMB share. Which is basically windows compatible. You have a config file in /etc/samba called smb.conf and you edit it for your liking and add your shares there. There are a lot of resources on the web for how to set it up. Once you set it up it just works.
If you are just sharing between linux computers on your network then NFS is great also. Its easier to setup than samba but is not compatible with windows.
Do a search for 'linux samba file share' and you will get a lot more information on it than I can provide in a forum.
If you are just sharing between linux computers on your network then NFS is great also. Its easier to setup than samba but is not compatible with windows.
Do a search for 'linux samba file share' and you will get a lot more information on it than I can provide in a forum.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
Re: Creative Solutions to use Sync.com with Linux OS
Okay cool, I just had a quick look and it seems that
"Samba is an extremely useful networking tool for anyone who has both Windows and Unix systems on his network. Running on a Unix system, it allows Windows to share files and printers on the Unix host, and it also allows Unix users to access resources shared by Windows systems."
Are you suggesting it as a way to share files with my partner? Or is there another part to your suggested workflow that I'm not seeing?
Because what I want to do is be able to backup my personal files from my Linux OS computer, to a shared sync.com vault. That is, I want to have full data backups that are located outside of my home, and am developing a workflow to make that as simple as possible.
"Samba is an extremely useful networking tool for anyone who has both Windows and Unix systems on his network. Running on a Unix system, it allows Windows to share files and printers on the Unix host, and it also allows Unix users to access resources shared by Windows systems."
Are you suggesting it as a way to share files with my partner? Or is there another part to your suggested workflow that I'm not seeing?
Because what I want to do is be able to backup my personal files from my Linux OS computer, to a shared sync.com vault. That is, I want to have full data backups that are located outside of my home, and am developing a workflow to make that as simple as possible.
Re: Creative Solutions to use Sync.com with Linux OS
If you want to do off-site backups then I am not the one to ask about that unless you want to get into some heavier setups. I can tell you that you can run a VPN (road warrior) type setup on some computer of yours off site.
Something like this works great for that: https://github.com/Nyr/wireguard-install
I subscribe to the idea that your personal data should never be on anyone elses computer (the cloud) as it becomes unsecure. Just not a good practice. There are others here that will argue that point and thats fine. Its all personal preference.
Samba shares can be shared across the internet but security becomes a major concern as you are opening up your computer to the internet. There are lots of bad actors out there.
I will leave off site backups to others that may read this and comment.
Something like this works great for that: https://github.com/Nyr/wireguard-install
I subscribe to the idea that your personal data should never be on anyone elses computer (the cloud) as it becomes unsecure. Just not a good practice. There are others here that will argue that point and thats fine. Its all personal preference.
Samba shares can be shared across the internet but security becomes a major concern as you are opening up your computer to the internet. There are lots of bad actors out there.
I will leave off site backups to others that may read this and comment.
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
Re: Creative Solutions to use Sync.com with Linux OS
Appreciate your perspective (genuinely, I'm always open & curious about how other people do things). Some interesting reading there for me!
Personal preference at this time is to use sync.com to keep an offsite backup of my data, so still looking for some ideas if anyone else is browsing this thread with a gem for me.
Personal preference at this time is to use sync.com to keep an offsite backup of my data, so still looking for some ideas if anyone else is browsing this thread with a gem for me.
Re: Creative Solutions to use Sync.com with Linux OS
I have this problem too. I can share what I did in the past. But my "solution" is not likely acceptable given everything you've shared.
I created a directory in my home folder called "Sync" (this directory was the root of my sync.com storage). I used SyncThing to automatically sync this directory with a windows computer. I installed the Sync Desktop application on the Windows computer. Since I never used the windows machine everything ran pretty smooth. I just left that windows machine running headlessly in the background. So overall it was not great to have a whole computer running.
Here's a summary of what I did:
Linux desktop <-- SyncThing --> Windows Sync Folder <-- Sync.com Desktop App --> Sync.com
Moving forward I was considering a few other ideas:
instead of running a dedicated windows computer on my network just for the Sync.com desktop app, maybe I could use a VM. Since linux VMs are a big topic, I'd probably use quickemu to help me get a windows VM running with minimal effort. Here's a link: https://github.com/quickemu-project/quickemu
With the windows VM, I could do the original trick with SyncThing. However, this solution also has some problems. First off, windows is still there. Secondly I'd end up with two copies of the data on my computer: 1) the copy in ~/Sync and 2) the copy in the VM. To get around having duplicate files I could use SMB to mount the Sync directory from windows. Specifically I could setup windows so that it will share the sync.com directory with my linux machine using SMB. Then I could mount the Sync directory in my home folder. Again this solution still has the problem that windows is there.
If I really wanted to avoid windows, quickemu can also create a macOS VM. Then I could do the same trick using SMB. Again this solution is bad because VMs take a lot of RAM and resources. So I'm not happy with this idea either. But quickemu makes creating a VM quite easy, so if I were in a hurry I might do this.
Lastly, I wonder if it's possible to run the Sync.com Desktop app using Wine or Proton. If this works, this would be a more light-weight way to run the program. I don't have enough experience with Wine. But maybe I could install wine and the Sync.com desktop app. Then I could somehow configure the sync.com desktop app to use my ~/Sync directory for syncing. Then I let the Sync.com windows app run in the background. I have no idea if this would work. But it's just an idea.
Wish I could say more. But so far those are my only ideas.
I created a directory in my home folder called "Sync" (this directory was the root of my sync.com storage). I used SyncThing to automatically sync this directory with a windows computer. I installed the Sync Desktop application on the Windows computer. Since I never used the windows machine everything ran pretty smooth. I just left that windows machine running headlessly in the background. So overall it was not great to have a whole computer running.
Here's a summary of what I did:
Linux desktop <-- SyncThing --> Windows Sync Folder <-- Sync.com Desktop App --> Sync.com
Moving forward I was considering a few other ideas:
instead of running a dedicated windows computer on my network just for the Sync.com desktop app, maybe I could use a VM. Since linux VMs are a big topic, I'd probably use quickemu to help me get a windows VM running with minimal effort. Here's a link: https://github.com/quickemu-project/quickemu
With the windows VM, I could do the original trick with SyncThing. However, this solution also has some problems. First off, windows is still there. Secondly I'd end up with two copies of the data on my computer: 1) the copy in ~/Sync and 2) the copy in the VM. To get around having duplicate files I could use SMB to mount the Sync directory from windows. Specifically I could setup windows so that it will share the sync.com directory with my linux machine using SMB. Then I could mount the Sync directory in my home folder. Again this solution still has the problem that windows is there.
If I really wanted to avoid windows, quickemu can also create a macOS VM. Then I could do the same trick using SMB. Again this solution is bad because VMs take a lot of RAM and resources. So I'm not happy with this idea either. But quickemu makes creating a VM quite easy, so if I were in a hurry I might do this.
Lastly, I wonder if it's possible to run the Sync.com Desktop app using Wine or Proton. If this works, this would be a more light-weight way to run the program. I don't have enough experience with Wine. But maybe I could install wine and the Sync.com desktop app. Then I could somehow configure the sync.com desktop app to use my ~/Sync directory for syncing. Then I let the Sync.com windows app run in the background. I have no idea if this would work. But it's just an idea.
Wish I could say more. But so far those are my only ideas.
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
Re: Creative Solutions to use Sync.com with Linux OS
Thank you!
That is such a thoughtful & comprehensive answer. I'll need to take a little time to read through and consider each option.
I reckon I'll have to compromise at some point with the 'solution' anyways given that some choices (Linux) don't play nice with other previously made choices (sync.com and iphone). That's just how it goes *shrugs*
Will update when I've worked them through.
That is such a thoughtful & comprehensive answer. I'll need to take a little time to read through and consider each option.
I reckon I'll have to compromise at some point with the 'solution' anyways given that some choices (Linux) don't play nice with other previously made choices (sync.com and iphone). That's just how it goes *shrugs*
Will update when I've worked them through.
Re: Creative Solutions to use Sync.com with Linux OS
The answers from cheese31 and coffee412 both revolve around using an intermediary Windows OS based system - copy data to the Windows system then use Sync.com app to backup from there. There is a suggestion to try using Wine to run the Sync.com app, which I would have suggested was worth a try BUT for the fact that you're a relatively new linuxmint user/convert and that Wine can be very tricky for beginners. You're obviously no beginner to 'computing' so you may well be ok with Wine - only one way to find out.
It boils down to how much time/effort/money you want to put in to the "solution". Being that you paid for a year and we're already into March it could be that by the time you work something out you wont have a great deal of time left on your subscription so it becomes relative in terms of cost/benefit / Pros vs Cons.
Personally, the suggestion from cheese31 looks to me to be the easiest and quickest solution for the short term.
1. Create a folder on hubby's Windows PC,
2. Share that folder in the normal Windows way,
3. Connect to that Windows share from the linuxmint system via mount -t cifs...
4. Backup data from linuxmint to the (now connected/mounted) Windows share.
5. On the Windows system, configure the Sync.com app to backup the shared folder.
Except for the Sync.com part, I've done what cheese31 suggests on my linuxmint system and it works. It took about 5 minutes and I nearly fell over because it was so simple. Windows networking can be a pain and it has been a pain. The Windows network file sharing functionality seems to go on and off by itself and the share/s becomes unavailable. I did work out how to stabilise it, I'm sorry I don't have any instructions to give you because I'm uncertain as to exactly what I did to fix it; I tried so many things and made zero notes. I do know it was something mundane and simple so don't be put off.
On the Windows side these 3 steps:
a) Create/modify a Windows user to match the linuxmint user - name & password.
b) Create a folder to hold the backup data
c) Share the folder created in b) with appropriate permissions
There are a million results from a Google search for how to share Windows folder/files, here's one from IBM that is basic. It doesn't give any troubleshooting or explanations but it is correct and accurate:
https://www.ibm.com/docs/en/cfm/2.0?top ... ng-options
On the linuxmint side it comes down to these 2 top level steps:
a) use
b) configure a permanent mount in
There are a zillion different ways to do each step above and a ton of opinions on the best/safest/most robust/simplest/etc ways to do each step. Further, each step can be broken down in to sub-steps if you need more help. You seem to be pretty clued up already so with the links I provided and maybe a bit of searching and RTFM'ing I can see you being successful without much trouble.
Examples & Instructions
Presumptions:
On the Windows system:
Here's a couple more guides:
Create a user: https://www.makeuseof.com/ways-to-creat ... t-windows/
Sharing: https://www.windowscentral.com/how-shar ... windows-10.
On the linuxmint system:
Use smbclient to test connect to the Windows share - here's one I used earlier:
or
You'll get prompted for a password. Once connected type help to get a list of commands and when you're done exploring type exit to close the connection and return to the terminal prompt. If it doesn't connect try using the IP Address of the Windows system instead of the name.
If the smbclient command is successful you should end up with an ftp like connection to the Windows share, as in you'll be at a
Basic explanation of the smbclient command:
Instead of smbclient, you can access the share from your file manager:
In the address field enter smb://servername/sharename
Using the example above it would be
Provided that works/worked the next step is to mount the share, either temporarily (using a script for instance) or 'semi'-permanently i.e. automount every time you boot the linuxmint system (/etc/fstab). Here's a command I used earlier:
or
Basic explanation of the mount command:
You'll have to be root (use sudo) to create the folders in /media i.e.
The -p switch means "no error if existing, make parent directories as needed".
Obviously the <servername> & <sharename> will differ on your setup as will the username.
Next:
If the mount command is successful, you will be able to access the files from the Windows system on the linuxmint system in the directory
There are still some things to do:
or
To edit /etc/fstab as root example:
You'll notice there's a bit more information in the line inserted into the /etc/fstab file compared to what was used for the mount command.
First: credentials=/etc/win-credentials
This is a way of providing your username, password and workgroup without having it obviously visible as plain text in /etc/fstab. It's a bit cleaner and safer though the credentials file is still plain text but should only be accessible to root.
Create a plain text file naming it something that makes sense to you (eg: win-credentials) with the following:
Then move the file to /etc/ :
Change the file permissions so that only root has access to it
600 gives root read/write and 400 gives root read only.
Second: uid=1000,gid=1000
Sets the user and group permissions to access the share
UID is the User ID, make this whatever your UID is. You can find your UID a few ways, via the Users and Groups app or in a terminal session with
GID is the Group ID for your user ID. You can find it in the same ways as UID, but if using the id command change the -u switch to -g
Third: file_mode=0755,dir_mode=0755
You probably understand by now what this does, sets the file and directory permissions to 755 - owner can read/write/execute, group/others can read/execute.
When you
Here's a bit of a primer about linux file permissions: https://www.warp.dev/terminus/linux-fil ... -explained
That's it...
Now reboot and login then check you have access to the share. Make sure to check your access level - Create a file and edit it. Create a directory and edit it. Copy files to and from the share.
Then it's just a matter of creating your backup methodology and sync'ing the data to Sync.com which you already have a handle on.
Good luck.
It boils down to how much time/effort/money you want to put in to the "solution". Being that you paid for a year and we're already into March it could be that by the time you work something out you wont have a great deal of time left on your subscription so it becomes relative in terms of cost/benefit / Pros vs Cons.
Personally, the suggestion from cheese31 looks to me to be the easiest and quickest solution for the short term.
I'll summarise that suggestion to simplify.Linux desktop <-- SyncThing --> Windows Sync Folder <-- Sync.com Desktop App --> Sync.com
1. Create a folder on hubby's Windows PC,
2. Share that folder in the normal Windows way,
3. Connect to that Windows share from the linuxmint system via mount -t cifs...
4. Backup data from linuxmint to the (now connected/mounted) Windows share.
5. On the Windows system, configure the Sync.com app to backup the shared folder.
Except for the Sync.com part, I've done what cheese31 suggests on my linuxmint system and it works. It took about 5 minutes and I nearly fell over because it was so simple. Windows networking can be a pain and it has been a pain. The Windows network file sharing functionality seems to go on and off by itself and the share/s becomes unavailable. I did work out how to stabilise it, I'm sorry I don't have any instructions to give you because I'm uncertain as to exactly what I did to fix it; I tried so many things and made zero notes. I do know it was something mundane and simple so don't be put off.
On the Windows side these 3 steps:
a) Create/modify a Windows user to match the linuxmint user - name & password.
b) Create a folder to hold the backup data
c) Share the folder created in b) with appropriate permissions
There are a million results from a Google search for how to share Windows folder/files, here's one from IBM that is basic. It doesn't give any troubleshooting or explanations but it is correct and accurate:
https://www.ibm.com/docs/en/cfm/2.0?top ... ng-options
On the linuxmint side it comes down to these 2 top level steps:
a) use
smbclient
to test connecting to the Windows system. I used this for help => https://www.thegeekdiary.com/smbclient- ... -in-linux/b) configure a permanent mount in
/etc/fstab
. I used these two links to help => - https://wiki.ubuntu.com/MountWindowsSharesPermanently
- https://linuxize.com/post/how-to-mount- ... -on-linux/
There are a zillion different ways to do each step above and a ton of opinions on the best/safest/most robust/simplest/etc ways to do each step. Further, each step can be broken down in to sub-steps if you need more help. You seem to be pretty clued up already so with the links I provided and maybe a bit of searching and RTFM'ing I can see you being successful without much trouble.
Examples & Instructions
Presumptions:
- You know how to name your Windows system and it's network (Workgroup) or at least how determine what they are.
- You can determine the IP Address of both systems (win: cmd prompt & ipconfig /all, linuxmint: terminal & ifconfig).
- You can create/modify a user on both systems, so the name and password is identical for both systems.
- You have a default install of linuxmint v19.3 or higher/newer - default install should have the required packages already installed, smbclient (optional), cifs-utils. If not then
sudo apt install smbclient cifs-utils -y
- On the Windows system you can create a folder and share it so your preferred user has full r/w access and have done so.
On the Windows system:
- Create a user that has the same details (name & password) as the user on the linuxmint system
- Make a folder somewhere to receive the linuxmint backup data/files.
- Share the folder using the Windows 'Sharing Wizard' (the thing that pops up when you try to share a folder from within File Explorer) and make sure the user created in step one has full access.
Here's a couple more guides:
Create a user: https://www.makeuseof.com/ways-to-creat ... t-windows/
Sharing: https://www.windowscentral.com/how-shar ... windows-10.
On the linuxmint system:
Use smbclient to test connect to the Windows share - here's one I used earlier:
Code: Select all
smbclient //Bank/Downloads --workgroup CITIZENS --user joebloggs
Code: Select all
smbclient //192.168.0.3/Downloads --workgroup CITIZENS --user joebloggs
If the smbclient command is successful you should end up with an ftp like connection to the Windows share, as in you'll be at a
smb: \>
prompt, able to use basic navigation commands such as dir, ls and cd etc. If you've ever used a command line ftp client or even a GUI to connect to an ftp server it should be familiar. The point of this is just to check that the Windows share is see-able and connect-able. You will be connected to the root of the Windows folder that you shared so it's worth putting a few files and directories in to the folder when you create it just so you have something to see and play with.Basic explanation of the smbclient command:
- //Bank/Downloads <---> Bank is the name of the Windows system (remember you can also use the IP Address instead). Downloads is the name of the share on the Windows system (It is also the name of the folder that is shared. It doesn't have to be that way, you can name the share as you prefer).
- --workgroup CITIZENS <---> --workgroup is the command line switch that tells smbclient to expect the following string/parameter to be the name of the workgroup to connect to and CITIZENS is that 'following string/parameter', which is the name of the Windows workgroup.
- --user <---> the command line switch that tells smbclient to expect the following string/parameter to be the name of the user to connect as.
- joebloggs <---> the network user name (configured on both systems).
password=STRING
or --authentication-file=FILE
smbclient --help
for more.Instead of smbclient, you can access the share from your file manager:
In the address field enter smb://servername/sharename
Using the example above it would be
smb://Bank/Downloads
. You should get a dialogue that asks for credentials, fill in the username, workgroup and password and follow the bouncing ball...Provided that works/worked the next step is to mount the share, either temporarily (using a script for instance) or 'semi'-permanently i.e. automount every time you boot the linuxmint system (/etc/fstab). Here's a command I used earlier:
Code: Select all
sudo mount -t cifs -o username=joebloggs //Bank/Downloads /media/Bank/Downloads
Code: Select all
sudo mount -t cifs -o username=joebloggs //192.168.0.3/Downloads /media/Bank/Downloads
- sudo <---> you should know. Run the command as root.
- mount <---> mount is the command to run.
- -t <---> the switch that tells mount the next parameter is the type of filesystem you're trying to mount.
- cifs <---> specify the filesystem type.
- -o username=joebloggs <---> -o is the switch that says expect an option to follow, username= is the option and joebloggs is the value. Pretty well self explanatory.
- //Bank/Downloads <---> the URL of the share to mount. The standard syntax is //<servername>/<sharename> . In the example the <servername> is the network or NETBIOS name of the system doing the sharing. You can use the IP Address instead of the name: //192.168.0.3/Downloads.
- /media/Bank/Downloads <---> this is where to mount the remote data on the local linux system.
/media is a dir that should already exist at the root of the linuxmint system.
It's important to use this dir - I'm not going into detail but it's the default mount point for removable media and mounting in this dir makes things so much simpler.
/Bank is a folder I created manually and it can be whatever name you want it to be. I made it the same as the name of the windows System I'm connecting to for easy identification. There may be more than one share on the system so I use subfolders for the name of the share.
/Downloads I created this folder with the same name as the share so it's easy to identify where the data is - on the system named Bank in the folder named Downloads.
This is the naming convention I chose, you're free to use your own naming convention.
You'll have to be root (use sudo) to create the folders in /media i.e.
sudo mkdir -p /media/Bank/Downloads
.The -p switch means "no error if existing, make parent directories as needed".
Obviously the <servername> & <sharename> will differ on your setup as will the username.
Next:
If the mount command is successful, you will be able to access the files from the Windows system on the linuxmint system in the directory
/media/Bank/Downloads
from a terminal and your file manager (Thunar, Nautilus) and any application. If you can't access the files with the normal login you use try to access them as root i.e. sudo ls /media/Bank/Downloads
. If you're successful with root and not with normal user then there are permissions to configure (chown, chmod). That's covered in the next section...There are still some things to do:
- Make the mount (semi)permanent - edit /etc/fstab
- Configure file permissions - can be done in /etc/fstab with the mount line item
- Check that the mount is successful after reboots of both systems
/etc/fstab
as root (sudo) and insert the line as follows:
Code: Select all
//Bank/Downloads /media/Bank/Downloads cifs credentials=/etc/win-credentials,uid=1000,gid=1000,file_mode=0755,dir_mode=0755 0 0
Code: Select all
//192.168.0.3/Downloads /media/Bank/Downloads cifs credentials=/etc/win-credentials,uid=1000,gid=1000,file_mode=0755,dir_mode=0755 0 0
sudo nano /etc/fstab
to edit from a terminal based editor or sudo xed /etc/fstab
to edit in a GUI based editor.You'll notice there's a bit more information in the line inserted into the /etc/fstab file compared to what was used for the mount command.
First: credentials=/etc/win-credentials
This is a way of providing your username, password and workgroup without having it obviously visible as plain text in /etc/fstab. It's a bit cleaner and safer though the credentials file is still plain text but should only be accessible to root.
Create a plain text file naming it something that makes sense to you (eg: win-credentials) with the following:
Code: Select all
username=joeblogs
password=Password123
domain=CITIZENS
sudo mv win-credentials /etc/
Change the file permissions so that only root has access to it
sudo chmod 600 /etc/win-credentials
or sudo chmod 400 /etc/win-credentials
.600 gives root read/write and 400 gives root read only.
Second: uid=1000,gid=1000
Sets the user and group permissions to access the share
UID is the User ID, make this whatever your UID is. You can find your UID a few ways, via the Users and Groups app or in a terminal session with
id -u
and cat /etc/passwd
- in /etc/passwd the first number is the UID and the second number is the GID. There are a bunch of other ways too.GID is the Group ID for your user ID. You can find it in the same ways as UID, but if using the id command change the -u switch to -g
id -g
Third: file_mode=0755,dir_mode=0755
You probably understand by now what this does, sets the file and directory permissions to 755 - owner can read/write/execute, group/others can read/execute.
When you
ls -l
the file or directory you should see -rwxr-xr-x
which is the octal notation representation of 0755.Here's a bit of a primer about linux file permissions: https://www.warp.dev/terminus/linux-fil ... -explained
That's it...
Now reboot and login then check you have access to the share. Make sure to check your access level - Create a file and edit it. Create a directory and edit it. Copy files to and from the share.
Then it's just a matter of creating your backup methodology and sync'ing the data to Sync.com which you already have a handle on.
Good luck.
Last edited by smokinmoe on Tue Mar 19, 2024 6:11 pm, edited 2 times in total.
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
Re: Creative Solutions to use Sync.com with Linux OS
Holy shirt, friend!
That is an extraordinary amount of work you have done to lay out those instructions for me. My appreciation levels are at 200/10.
I think you're right to say that the Windows intermediary is the way to go (even though UGH.) But like you say, don't want to invest more hours than it's worth on a potentially short term problem! Although I've definitely inspired hubby to install Linux on his personal PC, we still need Windows in the house for his work schtuff.
I deeply appreciate the level of detail you have gone into with your explanation, it's next level considerate and not only helps me to do this specific Thing, but also to better understand the environment I'm working in so I can do other Things someday too!
That is an extraordinary amount of work you have done to lay out those instructions for me. My appreciation levels are at 200/10.
I think you're right to say that the Windows intermediary is the way to go (even though UGH.) But like you say, don't want to invest more hours than it's worth on a potentially short term problem! Although I've definitely inspired hubby to install Linux on his personal PC, we still need Windows in the house for his work schtuff.
I deeply appreciate the level of detail you have gone into with your explanation, it's next level considerate and not only helps me to do this specific Thing, but also to better understand the environment I'm working in so I can do other Things someday too!
Re: Creative Solutions to use Sync.com with Linux OS
I use backintime (install from software manager), works like timeshift - takes snapshots, default is only home so complementary to timeshift. Snapshots are saved on an ext4 partition on an internal/removable drive.- FreeFileSync to mirror /media/tara/Data (/dev/sda1). I am manually mirroring this drive (which has 2TB capacity but is currently at about 125GB) to an external hard drive (almost) daily.
Both my timeshift and backintime snapshots are running automatically daily. You will find fans of freefilesync on the forum, you can probably automate that.
Try foxclone instead, I'm the dev. This is image backup, timeshift/backintime et al are file level backup. It is not an alternative but something to do as well. View image backup as disaster recovery, e.g. drive failure. It is more hassle to use, you have to boot from a separate OS which is why you need to download an iso, burn it to a stick and boot from it. Image backup knows nothing about files, just used blocks on partitions, you have to restore a complete partition.- Rescuezilla (considering using this, but is lower on my list to implement)
I take a foxclone image backup once every few months. If I have a major disaster, foxclone will get me back a working system current at the time of the backup, timeshift/backintime will then get me back to yesterday.
smokinmoe's suggestion sounds workable, I would mount the share from the win PC via fstab. This is a file the system reads on boot and it mounts anything it finds in there. Guidance on 'howto' can be provided if you have trouble with the links provided. freefilesync is probably the right solution for this as it is a win application ported to linux. I'll let others comment on that as I don't use it. When your sync.com subscription expires there are probably better solutions.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: Creative Solutions to use Sync.com with Linux OS
No worries Tara , good to see a fellow Aussie. I'm just trying to provide the kind of help I would have liked when I was a complete noob... now I'm just an ordinary noob.TaraThomasNow wrote: ⤴Mon Mar 18, 2024 1:31 am Holy shirt, friend!
That is an extraordinary amount of work you have done to lay out those instructions for me. My appreciation levels are at 200/10.
I made some minor edits to fix the post. Added sudo to the chmod commands when creating the credentials file and added -l to the ls command so it becomes
ls -l
in the Third section of the mount command explanation... and fixed a couple of typos and grammar.P.S. I don't know how you are creating your backups but you might like to investigate
rsync
. It's what the underlying logic of timeshift uses and what I use because it allows incremental backups - that is to say it can be set to only back up changed files. Remember the default methods for getting help for just about anything linux are --help i,e. rsync --help
and man i.e. man rsync
.P.P.S. Also if anyone is interested in freefilesync here's a link to it https://freefilesync.org
-
- Level 1
- Posts: 15
- Joined: Mon Mar 04, 2024 11:41 pm
- Location: Newcastle, Australia
Re: [SOLVED] Creative Solutions to use Sync.com with Linux OS
Mate, you've outdone yourself! It's a bloody steep learning curve, right?! AND I utterly overhauled my digital life (into Obsidian) at the same time as foraying into the land of Linux so there's been a lot of "Say what now?" moments. Where forum answers, I'm sure, are very helpful... but the entire beginners manual is assumed knowledge!
I'm still waiting for hubby to install Linux so I can test all the things but will definitely return and update once it's all up & running (or to beg for even more instruction!)
Anyways, I very much appreciate your effort. Definitely committed to paying it forward (just as soon as someone asks a questions simple enough for me to answer ).
I'm still waiting for hubby to install Linux so I can test all the things but will definitely return and update once it's all up & running (or to beg for even more instruction!)
Anyways, I very much appreciate your effort. Definitely committed to paying it forward (just as soon as someone asks a questions simple enough for me to answer ).