What tool can I use to scan all our folders and sub folders to make a sha256 recording of all our pictures and videos in many folders and sub folders.
find -type f -exec sha256sum {} \;
or
find -type f -print0 | parallel -0 -j4 'sha256sum {}'
Via Cygwin or some other gnu toolset.
I read some talk about people using par files. I never really understood par files. As to me making a second copy on a different type of medium is my par's. But maybe I'm wrong.
This is not a par(ity) file. This is a duplicate. Parity files use advanced math to be able to detect and correct any corruption within a file assuming it's less than a percentage specified when creating the parity files. You can read more, and find tools to create these files, here, but the tl;dr is that you create an additional set of data (say, 20%) which can correct up to 20% of the original data being corrupted.
Md5 is fast. But testing it on some images and text files. Md5 do t catch enough changes to make me happy. Sha256 is slower but it seems to identify more changes. Changes as in the fear of bitrot.
"don't catch enough changes to make me happy"? You will almost never hit an MD5 collision by chance, considering it takes tens of hours of GPU time to create one on purpose, that said, if you want to use SHA256 or another checksum, feel free, it's your data.
I'd like a day spent scanning all our drives into a sha256 file. That I can later just point and click and ha e it verify everything still matches.
Create hashes:
find -type f -print0 | parallel -0 -j4 'sha256sum {}'
Check hashes:
sha256sum -c SHA256SUMS; echo $?
Our backups are mixed up on DVD's, Blu-ray, some usb drives, the cloud, and these days. It looks like harddrives are the new backup mediums. So with that. I'd love some ideas for tools that can write the files needed to compare later. Thank you
I would use parity files over SHA256 hashes in your use case as bitrot, unless it hits metadata, is unlikely to take an entire file out with it. Even a low redundency level will infinitely improve your chances of recovery as SHA256 offers zero recovery, simply integrity checking.
Writing a wall of text without clear objectives outlined isn't a good recipe for getting responses on Reddit as it takes a lot of effort to parse the information you need, but the tl;dr I gathered was:
SSD vs HDD
Want data backed up upon external drive connection
Runs on Windows/Mac
In which case:
HDD vs SSD
Grab a HDD if all you're doing is Word/Excel/PDFs, it'll be slower but cheaper.
Backup on drive connection
Look into something like Arq, I haven't used them for years but I believe it has the feature set you want
you must be compromised theres no way this is legit
I have never had it in person but had this over the phone. It was barely an impact, I think I downloaded like 8TB in a month in like 2014?
Guy was super nice though, once I told him it was intentional he explained the difference between a GB and TB, once I said I understood those differences and it was still intention he was like "Cool, just checking in. Hope you have a nice day" and hung up, no threats or statements about service stability for other users.
This. I've used S3/B2 a lot and never had an issue. Hell, there was even one period where I didn't pay my S3 bill for 6 months and my data was not deleted.
Whether I charge or don’t charge for the service is irrelevant to my question
Arguably it really isn't, you're running a business and your business needs to cover its costs. Lifetime storage and archival isn't included in your upfront costs. If you don't bill, keep it for 12 months then nuke it. If you do bill: treat it like the business expense it is and store it properly using something like AWS S3 Glacier Deep Archive at the highest quality you have.
Could you elaborate on this at all?
I am not /u/Party_9001 but a relatively static video will require a lot less bitrate than a rave with flashing lights and dancing. Obviously these are extremes but...
To avoid the X-Y problem I thought I'd also include an example script that utilises this search pattern just in case I'm being dumb.
Problem: Need to know which PDF of a remote server the naming scheme changed.
Solution:
#!/usr/bin/env bash
min=0;
max=918;
while [ true ]; do
attempt=$(printf "%2d" $(((min+max)/2)));
curl -I --silent --fail "https://www.grc.com/sn/sn-${attempt}-notes.pdf" > /dev/null;
if [[ "${?}" -eq "0" ]]; then
max=${attempt};
else
min=${attempt};
fi;
if [[ $((max-min)) -le 1 ]]; then
echo "First success: ${max}";
break;
fi;
echo "Setting new range to ${min}-${max}";
done;
Output:
$ ./snBinarySearch.sh
Setting new range to 0-459
Setting new range to 229-459
Setting new range to 344-459
Setting new range to 401-459
Setting new range to 430-459
Setting new range to 430-444
Setting new range to 430-437
Setting new range to 430-433
Setting new range to 431-433
First success: 432
Desired command I'm looking for would replace that entire script with:
I think OP is looking at reducing storage quantity. For example storing two disk images, one from 2 months ago and one today, but only use diskSize+diffSize in space rather than 2*diskSize.
I'm not sure they're trying to reduce read/write cycles, but I could be wrong.
By YouTubing I mean making videos on YouTube. So I went to add those to my backup archive. I can get my own ones out with Google Takeout. But I also manage a few brand accounts. So I just add those to the NAS, which then goes up to the cloud, as I go along.
Yeah, this is going to hinder you. Backing up the source material more so than the actual finalised video (as that will have to be uploaded to YouTube anyway).
Clonezilla - no method to use it in conjunction with a differential/incremental approach that I'm aware of unfort.
I'm sure this is a solved issue, google for diffing disk images. Maybe something like this (haven't tried it personally).
in the end, if you are creating lots of local files and needing to back them up over a small pipe, it might not be possible as you originally thought. Pity though :(
Hope I at least gave you something to think about.
So I started YouTube-ing a few months ago and naturally that's accelerated the pace of my data growth
I mean, if by "YouTubing" you mean downloading YouTube videos, wouldn't it be better to do that in the cloud? For example instead of:
YouTube -> Home -> Object storage
You just do:
YouTube -> Cloud instance -> Object storage
Clonezilla: I update my full disk images about once a month. So often enough that a good solution would be ideal.
Is there any way to base your new image on your last one? I'd probably look into a method of doing that, I can imagine you could squish your disk images into a couple gig of "diff". Even if you want a full image backed up rather than the diff you could upload the diff to a remote server, recalculate the original disk image using the last image & the new diff, check the hash locally matches your original disk, then store in an object store/whatnot.
So there are a couple of PDFs being added to my main website (which serves as a sort of backup repo) on most days too.
Once again, your site is probably hosted remotely so makes sense to just back that up straight to the cloud rather than pulling it locally to then reupload. If your hosting a static site on an object store anyway (Like S3/etc...) then that might not be required for your needs and/or be easily to do.
EDIT: I thought I'd quickly add an example of what I mean. Personally I like to archive all podcasts I listen to. At the same time, I have no desire to have those files locally as I just listen to them normally via my podcast client unless they go (get taken) down.
So, via AWS, I have a script (via Lambda) configured that once a day it'll download all new podcasts and add them to my S3 archival bucket with the DEEP_ARCHIVE storage class which costs me $1/TB/month to store. Here is a screenshot of my current storage from my podcasts prefix.
These files never touch my local network because I see no need for them to. I'm doing nothing to them locally that can't be done in the cloud. If I ever want to listen to one of them because they got removed at source I can simply initiate a restore from deep archive and stream them via the podcast app as usual.
Do you have a source on that? All information I've read is very critical about long term storage on unpowered flash memory, citing eventual decay of the memory cells as electrons escape the charge trap (or something similar, I'm no SSD expert).
800GB isn't that much, if you can find somewhere to upload it you can probably do it in an hour or two (at gigabit). For example, university/libraries/cafes/etc...
How often do you produce data? Because if it's not often I'd honestly just upload it directly. You're looking at ~37 days which is less time I've maxed my internet for.
The bigger issue is that I understand that if you're constantly uploading that will reduce your download speed a bit right?
It shouldn't be. The only time it will be (that I can think of, but I'm not a network engineer) would be when your router's outbound buffer is full due to the upload and thus your download's acknowledgements get delayed. In this case, either configure some sort of quality of service (QoS) or just set your uploader's max speed to ~80% your available upload (total upload - upload used during downloads).
So let's say I wanted to upload my latest Clonezilla full to the cloud.
How often does this actually happen? I mean, worse case you could lease a Snowball and literally ship a HDD. This costs ~$60 for an 8TB HDD from Amazon. You can see if competitors are cheaper.
The fact you're talking about dumping 1PB for $12 a month is insane. The HDDs alone would cost thousands of dollars, and that's assuming little/no redundancy.
glacier doesnt really look like a gsuite replacement
I agree. It's an archival system, whereas Google Drive is attempting to be a document creation system/very user friendly object store.
every action there costs something. the storage, all api calls, traffic
Sure, but that's the trade for having cheap, infinitely expandable and scalable, programmatic storage. $1/TB/month isn't something easily to come across.
the whole service was designed with it people job security in mind so theres no convenient way to use it
I disagree. S3's API is extremely common and probably only second to FTP. Google "S3 clients", or use something like RClone (which a lot of people were using for GSuite anyway).
everything is done through the api and it gets extremely expensive if you try to use it as unlimited storage like people use googles services
$1/TB/month is actually very cheap in the industry. I think you're pretty much hitting the nail on the head with why GSuite was unsustainable and thus shutdown.
Depends what you mean "restore". Glacier is complicated. I'm assuming you mean restore over the internet to your local disk.
Step 1. Restore from Glacier Deep Archive -> S3 RRS
Step 2. S3 RRS -> Local Disk
Note: if you do processing on AWS, you can skip step 2 (the expensive part).
So, step 1 can be done in one of two ways. "Bulk" or "Standard". Bulk takes ~48 hours to restore your data, standard takes ~12 hours.
Cost is below:
Tier
Cost per object (file)
Cost per GB
Cost for 1TB made up of 100MB files
Calculation
STANDARD
$0.0001
$0.02
$21
(1TB/100MB*$0.0001)+(1TB/1GB*$0.02)
BULK
$0.000025
$0.0025
$2.75
(1TB/100MB*$0.000025)+(1TB/1GB*$0.0025)
Now your files are in S3 RRS. So, you're now billed $0.024/GB/month, so assuming an optimal restore you'll only be keeping your data for 1 day, or $0.0008 per GB. Cost for 1TB of data would be $0.79.
Finally, you have to get your out of AWS. There are two options for this, either downloading your data (expensive) or asking for a HDD to be sent to you with your data (expensive, but counterintuitively less expensive than downloading your data).
Downloading your data costs $0.09/GB ($90/TB).
Getting a HDD shipped to you varies based on the amount of data, but you're looking at ~$60 for the HDD lease (5 days) + $30/TB, so after 1TB it's cheaper to get a HDD sent to you with your data than it is to download your data over the internet.
Compared to other providers (in this case Backblaze), you break if you restore fully every ~18 months or longer (via download, earlier if you use the HDD method and/or don't recover all your data at once).
I got laughed at and ridiculed for predicting this when advising people not to count on G-suite as a long term backup solution. It will never happen they said.
Yup, I never actually posted that but I saw others being told to stop worrying and I always disagreed. I'm glad I have redundancy in Glacier Deep Archive.
If you're not paying enough $$$ to keep the service afloat, the service will die.
Does this retain Live Photos?
Just enable
sshdand you do the rest? But if the data is valuable, pay.or
Via Cygwin or some other gnu toolset.
This is not a par(ity) file. This is a duplicate. Parity files use advanced math to be able to detect and correct any corruption within a file assuming it's less than a percentage specified when creating the parity files. You can read more, and find tools to create these files, here, but the tl;dr is that you create an additional set of data (say, 20%) which can correct up to 20% of the original data being corrupted.
"don't catch enough changes to make me happy"? You will almost never hit an MD5 collision by chance, considering it takes tens of hours of GPU time to create one on purpose, that said, if you want to use SHA256 or another checksum, feel free, it's your data.
Create hashes:
Check hashes:
I would use parity files over SHA256 hashes in your use case as bitrot, unless it hits metadata, is unlikely to take an entire file out with it. Even a low redundency level will infinitely improve your chances of recovery as SHA256 offers zero recovery, simply integrity checking.
Writing a wall of text without clear objectives outlined isn't a good recipe for getting responses on Reddit as it takes a lot of effort to parse the information you need, but the tl;dr I gathered was:
In which case:
HDD vs SSD
Grab a HDD if all you're doing is Word/Excel/PDFs, it'll be slower but cheaper.
Backup on drive connection
Look into something like Arq, I haven't used them for years but I believe it has the feature set you want
I have an S3 bucket called
archivewhich is filled with files that are immutable. I transfer that usually with RClone.BTRFS nommed my data during early versions. Lost ~50TB of data, wasn't all that concerned due to backups of the important parts but was a PITA.
I have never had it in person but had this over the phone. It was barely an impact, I think I downloaded like 8TB in a month in like 2014?
Guy was super nice though, once I told him it was intentional he explained the difference between a GB and TB, once I said I understood those differences and it was still intention he was like "Cool, just checking in. Hope you have a nice day" and hung up, no threats or statements about service stability for other users.
This. I've used S3/B2 a lot and never had an issue. Hell, there was even one period where I didn't pay my S3 bill for 6 months and my data was not deleted.
Get what you pay for.
Arguably it really isn't, you're running a business and your business needs to cover its costs. Lifetime storage and archival isn't included in your upfront costs. If you don't bill, keep it for 12 months then nuke it. If you do bill: treat it like the business expense it is and store it properly using something like AWS S3 Glacier Deep Archive at the highest quality you have.
I am not /u/Party_9001 but a relatively static video will require a lot less bitrate than a rave with flashing lights and dancing. Obviously these are extremes but...
This. Just chuck it on AWS S3 Glacier Deep Archive for $1/TB/month.
To avoid the X-Y problem I thought I'd also include an example script that utilises this search pattern just in case I'm being dumb.
Problem: Need to know which PDF of a remote server the naming scheme changed.
Solution:
Output:
Desired command I'm looking for would replace that entire script with:
I think OP is looking at reducing storage quantity. For example storing two disk images, one from 2 months ago and one today, but only use diskSize+diffSize in space rather than 2*diskSize.
I'm not sure they're trying to reduce read/write cycles, but I could be wrong.
Yeah, this is going to hinder you. Backing up the source material more so than the actual finalised video (as that will have to be uploaded to YouTube anyway).
I'm sure this is a solved issue, google for diffing disk images. Maybe something like this (haven't tried it personally).
in the end, if you are creating lots of local files and needing to back them up over a small pipe, it might not be possible as you originally thought. Pity though :(
Hope I at least gave you something to think about.
I mean, if by "YouTubing" you mean downloading YouTube videos, wouldn't it be better to do that in the cloud? For example instead of:
You just do:
Is there any way to base your new image on your last one? I'd probably look into a method of doing that, I can imagine you could squish your disk images into a couple gig of "diff". Even if you want a full image backed up rather than the diff you could upload the diff to a remote server, recalculate the original disk image using the last image & the new diff, check the hash locally matches your original disk, then store in an object store/whatnot.
Once again, your site is probably hosted remotely so makes sense to just back that up straight to the cloud rather than pulling it locally to then reupload. If your hosting a static site on an object store anyway (Like S3/etc...) then that might not be required for your needs and/or be easily to do.
EDIT: I thought I'd quickly add an example of what I mean. Personally I like to archive all podcasts I listen to. At the same time, I have no desire to have those files locally as I just listen to them normally via my podcast client unless they go (get taken) down.
So, via AWS, I have a script (via Lambda) configured that once a day it'll download all new podcasts and add them to my S3 archival bucket with the
DEEP_ARCHIVEstorage class which costs me $1/TB/month to store. Here is a screenshot of my current storage from my podcasts prefix.These files never touch my local network because I see no need for them to. I'm doing nothing to them locally that can't be done in the cloud. If I ever want to listen to one of them because they got removed at source I can simply initiate a restore from deep archive and stream them via the podcast app as usual.
Do you have a source on that? All information I've read is very critical about long term storage on unpowered flash memory, citing eventual decay of the memory cells as electrons escape the charge trap (or something similar, I'm no SSD expert).
800GB isn't that much, if you can find somewhere to upload it you can probably do it in an hour or two (at gigabit). For example, university/libraries/cafes/etc...
How often do you produce data? Because if it's not often I'd honestly just upload it directly. You're looking at ~37 days which is less time I've maxed my internet for.
It shouldn't be. The only time it will be (that I can think of, but I'm not a network engineer) would be when your router's outbound buffer is full due to the upload and thus your download's acknowledgements get delayed. In this case, either configure some sort of quality of service (QoS) or just set your uploader's max speed to ~80% your available upload (total upload - upload used during downloads).
How often does this actually happen? I mean, worse case you could lease a Snowball and literally ship a HDD. This costs ~$60 for an 8TB HDD from Amazon. You can see if competitors are cheaper.
What speed is "too slow"? Both upload and download.
Glacier Deep Archive? $1/TB/month, expensive retrievals, but hey, it's what you want.
The fact you're talking about dumping 1PB for $12 a month is insane. The HDDs alone would cost thousands of dollars, and that's assuming little/no redundancy.
I mean:
I agree. It's an archival system, whereas Google Drive is attempting to be a document creation system/very user friendly object store.
Sure, but that's the trade for having cheap, infinitely expandable and scalable, programmatic storage. $1/TB/month isn't something easily to come across.
I disagree. S3's API is extremely common and probably only second to FTP. Google "S3 clients", or use something like RClone (which a lot of people were using for GSuite anyway).
$1/TB/month is actually very cheap in the industry. I think you're pretty much hitting the nail on the head with why GSuite was unsustainable and thus shutdown.
Depends what you mean "restore". Glacier is complicated. I'm assuming you mean restore over the internet to your local disk.
Step 1. Restore from Glacier Deep Archive -> S3 RRS
Step 2. S3 RRS -> Local Disk
Note: if you do processing on AWS, you can skip step 2 (the expensive part).
So, step 1 can be done in one of two ways. "Bulk" or "Standard". Bulk takes ~48 hours to restore your data, standard takes ~12 hours.
Cost is below:
Now your files are in S3 RRS. So, you're now billed $0.024/GB/month, so assuming an optimal restore you'll only be keeping your data for 1 day, or $0.0008 per GB. Cost for 1TB of data would be $0.79.
Finally, you have to get your out of AWS. There are two options for this, either downloading your data (expensive) or asking for a HDD to be sent to you with your data (expensive, but counterintuitively less expensive than downloading your data).
Downloading your data costs $0.09/GB ($90/TB).
Getting a HDD shipped to you varies based on the amount of data, but you're looking at ~$60 for the HDD lease (5 days) + $30/TB, so after 1TB it's cheaper to get a HDD sent to you with your data than it is to download your data over the internet.
Compared to other providers (in this case Backblaze), you break if you restore fully every ~18 months or longer (via download, earlier if you use the HDD method and/or don't recover all your data at once).
Yup, I never actually posted that but I saw others being told to stop worrying and I always disagreed. I'm glad I have redundancy in Glacier Deep Archive.
If you're not paying enough $$$ to keep the service afloat, the service will die.
Works fine in the UK.
Why should I use you over someone like Wasabi which is cheaper?
Isn't Backblaze S3 compatible?