12
submitted 12 hours ago by CA0311@hexbear.net to c/technology@hexbear.net

i have a 4tb sdd with everything i ever had or saved from every computer i've ever had. i am right now paying for a cloud service to keep it backed up, just in case, because there's lots of stuff on there i would be very sad to lose

but i'm sorting, adding, deleting, renaming, etc on the drive and the backup service isn't flexible enough to keep up. i don't need it exactly backed up all the time but i'd like to be able to back up the changes more often. also i can't really afford the cloud service anymore anyway

i have a 4tb external hard drive that could keep it backed up safely as long as my house doesn't burn down in a forest fire. my question is, is there a way to make it easy to keep a external drive the same as my internal ssd when i want without copying all the files using copy paste? i'd like it to prioritize the changes on the ssd so if i delete a file on the ssd it will get rid of it on the backup (the cloud service doesn't do that, it only adds to the data on the cloud.)

i'm sure it's pretty easy but i don't know how. i'm using windows 10 right now. if i NEED to use linux i sometimes boot mint on a usb, but i'd rather get it working on windows 10 because i'll be using windows 10 until they stop supporting it (not enough free computer time rn to make the switch)

top 4 comments
sorted by: hot top controversial new old
[-] someone@hexbear.net 4 points 8 hours ago* (last edited 7 hours ago)

If you don't mind doing command-line stuff and setting up Task Scheduler under Windows, rclone is a fantastic command-line backup tool that should do exactly what you want automatically. Since you mention having used Mint before I think you should be okay here.

The exclude and include config file format needs a precise format though. To save you some time and headaches here's the short version to get you started.

If you want to exclude a folder, you need to specific the exact path plus a trailing "/**". Not really intuitive, so this is why I like to always mention it when I recommend rclone. My example here is using Linux paths but it works the same under Windows. I have it saved under "~/.config/rclone/exclude.txt". Here's a few lines from mine:

.cache/**
.local/share/Trash/**

As long as I run the backup script in my home directory like this:

rclone --size-only --exclude-from ~/.config/rclone/exclude.txt sync /home/realusername onlinebackupcrypt1:backup

This will sync all files with changed sizes, excluding what is in the text file above, from my home folder to an encrypted online backup.

"Size-only" makes sure that the comparison doesn't consider access time of a file, just if the size changed.

"Exclude-from" reads in that file above one line at a time to exclude files or folders. You can put it anywhere you like so long as you use the right filename in the command. This is good for making sure that caches, temp folders, trash folders, etc. don't get synced.

"Sync" means upload and overwrite changed files, and delete files remotely that have been deleted locally.

"/home/realusername" is the source, in this case my home folder.

"onlinebackupcrypt1:backup" is using a folder called "backup" in a previously set up destination called "onlinebackupcrypt1".

To set up a destination just type "rclone config" and it will walk you through it. It's dead simple. In your case your destination will be of the type "local".

The encrypted backup is a great feature of rclone, especially for online services. It uses a sort of encrypted overlay on top of any destination that's been previously set up, whether an online service or a local drive. It encrypts file and folder names as well. For example, you can set up a Google drive as a backup destination, and then create an encrypted destination on top of that Google drive destination. The encryption is then completely automatic using a key you choose. Google will have no idea what you're storing.

[-] Chronicon@hexbear.net 2 points 6 hours ago* (last edited 6 hours ago)

rclone mentioned!

[-] CA0311@hexbear.net 4 points 8 hours ago

amazing, thanks so much! i will try it when the kids are asleep

[-] someone@hexbear.net 4 points 7 hours ago

No worries! Message me if you run into any weirdness, happy to help.

this post was submitted on 17 Oct 2024
12 points (100.0% liked)

technology

23236 readers
119 users here now

On the road to fully automated luxury gay space communism.

Spreading Linux propaganda since 2020

Rules:

founded 4 years ago
MODERATORS