new posts

This commit is contained in:
casual 2024-08-04 01:25:41 +03:00
parent c4ae72aab3
commit 6f63ade83e
10 changed files with 332 additions and 7 deletions

View File

@ -0,0 +1,137 @@
+++
title = 'HowTo backup'
date = 2024-08-10
hidden = true
+++
In short: 3-2-1 backup strategy.<!--more-->
## Backup strategy
You should have:
- 3 copies of data
- on 2 different types of storages
- including 1 off-site copy
### Why so many copies?
What if your main drive with data will die? That's the reason to have backup nearby.
What if your main storage Server will die with all drives in it due to power spike (flood,etc...)? That's the reason to have off-site backup.
![](https://imgs.xkcd.com/comics/backup_batteries.png)
### 3 copies of data
You should have:
- Original data
- 1 backup at place (another drive)
- 1 backup in another place (encrypted in cloud, HDD stored in another remote location (friend's house))
Backups which should be made regularly (daily or more frequently for critical data, +depends how "hot" data (how fast it changes))
### 2 types of storages
You need to have different 2 types of storage to metigate if some error may affect all devices of 1 type.
Storage types examples:
- Internal HDD/SSD (we will focus on them)
- External HDD (them)
- USB drive/SSD
- Tape library
- Cloud storage (and them)
### 1 off-site copy
It's pretty simple:
- encrypted cloud backup
- encrypted HDD with backup in another town in friend's house (secured by bubble wrap)
- or at least encrypted HDD in another house (also secured by bubble wrap)
The more distant this off-site backup the better.
{{< spoiler Examples >}}
&nbsp;
## Examples
### Enterprise-ish (Expensive at start, hard setup, easy to maintain)
Ceph cluster:
- requires 3 servers (at least) (OS - Proxmox)
Ideally server motherboard, ECC RAM, Intel Xeon E5 v4 CPU Family or better / AMD Epyc analog
- any number of drives (but at least 3 drives)
Ideally enterpise-class (or with "RAID support"). The more IOPS - the better
- [automatic snapshots](https://github.com/draga79/cephfs-snp)
- 10Gb network (if you expect total 9-ish (or more) HDD drives or some SSDs)
- and ideally SSD cache (at least 2 SSDs with PLP) (1tb each more than enough for 10TB of raw storage)
Off-site backup:
Cloud storage + [dublicati](https://github.com/duplicati/duplicati)
OR
Proxmoxx Backup Server at another city (e.g. at friend's house) with RAID1/5/6
(thou you should set it up so if malware/hacker would get to root user it won't overwrite backups)
#### Pros
- Low chances of loosing data because you essentially have 3 copies (by default, 2 min) of data + hourly/daily/weekly/montly snapshots
So if you get 2 dead drives in a same time - you still won't loose your data
Essentially it covers 2 copies of data
- If drive fails - you simple take it out, put new drive in and say that you want add this drive to pool via WebGUI
- With SSD cache you can throw in any trashy HDD drives until they start to fail
- You can add any number of drives
- And if you need/want to be able to freely shutdown one of a servers and still be able to access data - you need to distribute drives so their raw storage would be even on each server.
Or just add in few more server and distribute drives between them so you would still be able to access this storage
- If you get your house+servers destroed - you wouldn't loose your data
#### Cons
- Expect 30% usable space from raw storage (you can use Erasure Coding (RAID5 analog) but it will be slow as hell)
- Bad/Slow (in terms of IOPS and delay times) drives without PLP SSD cache can have amazingly bad total speed
- Power usage might be a burden if you don't have any
- More performance comes with more drives because speed = available IOPS and avarage access time for 2-3 drives that have that data. So more drives, more IOPS we have (excluding SSD cache case)
### Home-server (Medium setup, hard to maintain)
#### Pros
-
-
-
#### Cons
-
-
-
### Home PC (Medium setup, hard to maintain)
#### Pros
-
-
-
#### Cons
-
-
-
### Portable Laptop (easy setup, hard to maintain)
#### Pros
-
-
-
#### Cons
-
-
-
{{< /spoiler >}}
{{< source >}}
https://www.techtarget.com/searchdatabackup/definition/3-2-1-Backup-Strategy
{{< /source >}}

View File

@ -0,0 +1,38 @@
+++
title = 'HowTo Buy HDD'
date = 2024-08-17
hidden = true
+++
##
https://www.extremetech.com/computing/170748-how-long-do-hard-drives-actually-live-for
Consumer HDD drive have following survival chances:
- 92% survival chance for 1.5y (due to manafacturing errors) (5.1% per year)
- 90% survival for 3 years (due to random failure) (1.41% per year)
- -12% every following year (due to wear-out)
For Enterprise HDDs survival a bit higher
https://www.reddit.com/r/DataHoarder/comments/k4rc7a/comment/gedlp75/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
Seller can have 97% positive review while scamming every 30th customer
4tb
Price - 4600-3100p (cost of new / lifetime (3 years) * runtime as % of lifetime) (/2, /3)
Run time - 13000-17000h (1.5-2 years)
2tb
Price 3300-2200p
(01,C7, 07,) No CRC errors, read errors, reassigned sectors (?)
1tb
Price - 1000p
{{< source >}}
https://www.reddit.com/r/DataHoarder/comments/1eg0kpf/brand_preference/
https://www.reddit.com/r/DataHoarder/comments/k4rc7a/comment/gedlp75/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
https://www.extremetech.com/computing/170748-how-long-do-hard-drives-actually-live-for
{{< /source >}}

View File

@ -0,0 +1,52 @@
+++
title = 'HowTo Data Hoard'
date = 2024-08-31
hidden = true
+++
![](https://preview.redd.it/this-meme-speaks-to-me-v0-j9dc4klgmw0a1.png?width=640&crop=smart&auto=webp&s=91e23f46de5cbc09861302fcc5b4d00e8192c193)
## Who is data hoarder?
Data hoarder archive large amounts of digital data (terrabytes) that might otherwise be lost, such as old video games, videos and websites.<!--more-->
### Why does they do it?
{{< spoiler "Spoiler" >}}
Usually you start becoming data hoarder when something that you expected to be online and what you can freely access (e.g. bought video games/series on PSStore/Netflix) becomes inaccessable due to various reasons:
- Owner deletes data - outdated information, [personal choice](https://www.reddit.com/r/techsupport/comments/u8vyl3/google_wont_remove_outdated_content_from_its/), hosting platform policy change
- Platform policies - if content/account violates guidelines [it gets removed](https://www.reddit.com/r/OneFinanceBank/comments/1d8cixt/did_they_just_take_down_the_other_one_subreddit/) (e.g. for hate speech, misinformation, or copyright infringement...)
- Legal reason - content may be removed due to legal issues, such as [DMCA takedown](https://www.dmca.com/FAQ/What-is-a-DMCA-Takedown), [court orders](https://www.newsbytesapp.com/news/entertainment/bombay-high-court-protects-arijit-singhs-personality-rights/story), [political stuff](https://www.reuters.com/business/media-telecom/youtube-blocks-russian-state-funded-media-channels-globally-2022-03-11/)
- Technical issues - drive on server may die and sysadmin forgot to try make disaster recovery beforehand, [cloud sync errors](https://spanning.com/blog/4-real-life-examples-of-saas-data-loss/)
- Archiving - platform may decide that this content no longer relevant/needed - so they move it to more harder to access place
{{< /spoiler >}}
## HowTo Data Hoard
1. [Buy terrabytes of drives](/tech/HowTo_buy_hdd)
2. Access terrabytes of data
- put drives in your PC
- build/buy NAS
3. Use [3-2-1 backup](/tech/HowTo_backup) strategy for important data
4. Download everything that you've ever needed in life and never delete
- [HowTo download site?](/tech/howto_download_site)
- [HowTo download youtube videos?](/tech/howto_download_youtube_video)
{{< spoiler Spoiler >}}
I forgot to remove it from template
{{< /spoiler >}}
{{< source >}}
Random YouTube videos
My Experience
{{< /source >}}
https://en.wikipedia.org/wiki/Digital_hoarding
https://www.pewresearch.org/data-labs/2024/05/17/when-online-content-disappears/
https://www.reddit.com/r/DataHoarder/
https://www.reddit.com/r/DataHoarder/comments/yzb5m0/this_meme_speaks_to_me/

View File

@ -0,0 +1,36 @@
+++
title = 'HowTo Download a website'
date = 2024-08-24
+++
```
wget \
--recursive \
--level=inf \
--no-clobber \
--page-requisites \
--adjust-extension \
--span-hosts \
--user-agent=Mozilla \
--convert-links \
--no-parent \
-e robots=off \
--domains blog.ca.sual.in \
https://blog.ca.sual.in/
```
It will download my site. You can download specific subdirectory.
You may want to decrease `--level` - its' depth for subdirectories download.
`--domains` - limits to specific domain.
<!-- "© Casual, 2024" TODO - this thing have last link from source -->
{{< source >}}
https://superuser.com/questions/1415717/how-to-download-an-entire-site-with-wget-including-its-images#1415765
https://simpleit.rocks/linux/how-to-download-a-website-with-wget-the-right-way/
{{< /source >}}

View File

@ -0,0 +1,27 @@
+++
title = 'HowTo Download Youtube video'
date = 2024-08-03
+++
1. [Install yt-dlp](https://github.com/yt-dlp/yt-dlp/wiki/Installation#using-the-release-binary)
```bash
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o ~/.local/bin/yt-dlp; chmod a+rx ~/.local/bin/yt-dlp
```
<!-- TODO make scroll bar black -->
2. Download a Video or Playlist
```bash
yt-dlp -f "best[height<=1080]+bestaudio" https://www.youtube.com/watch?v=kf5eUikyXYA
```
### Options cheatsheet
- Download video in best quality - `yt-dlp -f bestvideo+bestaudio <URL>`
- Download 1080p video - `yt-dlp -f "best[height<=1080]+bestaudio" <URL>`
- Download mp3 audio - `yt-dlp --extract-audio --audio-format mp3 --audio-quality 0 <URL>`
- Resume download - `yt-dlp -c <URL>`
{{< source >}}
https://github.com/yt-dlp/yt-dlp/
https://ostechnix.com/yt-dlp-tutorial/
random cheatsheet from navi TODO it's link, need to fix shortcode
{{< /source >}}

View File

@ -115,6 +115,26 @@ params:
#test rm me
markup:
highlight:
# anchorLineNos: false
# codeFences: false
# guessSyntax: true
# hl_Lines: ""
# hl_inline: false
# lineAnchors: ""
# lineNoStart: 1
# lineNos: false
# lineNumbersInTable: true
# noClasses: true
# noHl: false
# style: github-dark
style: solarized-dark256
# style: xcode-dark
# style: xcode-dark
# style: tokyonight-storm
# style: nord
# style: modus-vivendi
# tabWidth: 4
goldmark:
renderer:
unsafe: true # enable raw HTML in Markdown
@ -126,3 +146,4 @@ markup:
# path: github.com/Junyi-99/hugo-theme-anubis2
# - path: anubis2
#

View File

@ -16,6 +16,6 @@
xdg-open "https://blog.ca.sual.in/" &
xdg-open "https://www.deepl.com/en/translator#ru/en-us/" &
hugo server
hugo server -DEF
'';
}

View File

@ -3,15 +3,20 @@ title = 'HowTo DO SOMETHING
date = 2024-05-03
+++
<!-- &nbsp; -->
I forgot to write summary<!--more-->
![](./img/10.png)
{{< spoiler Examples >}}
&nbsp;
## Examples
{{< spoiler Spoiler >}}
I forgot to remove it from template
{{< /spoiler >}}
{{< /spoiler >}}
{{< source >}}
Random YouTube videos

View File

@ -3,6 +3,9 @@
/* --bg-color: #1d1e20; */
--bg-color: #111111;
/* white scroll fix */
color-scheme: dark;
/* --card-color: #2e2e33; */
--card-color: #191919;
@ -20,7 +23,7 @@
--nav-link-color: #b6b6b6;
--pre-color: #f8f8f2;
--pre-bg-color: rgba(175, 184, 193, 0.1);
/* --pre-bg-color: rgba(175, 184, 193, 0.1); better look*/
--pre-border-color: rgba(175, 184, 193, 0.3);
--bq-color: #ccc;

View File

@ -34,8 +34,13 @@
:root {
--card-border-radius: 0.5em;
--card-margin: 1.5em;
/* --color-scheme: dark; */
}
/* pre { */
/* color-scheme: dark; */
/* } */
html {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 1 */
@ -198,6 +203,7 @@ pre {
overflow: auto;
margin-top: 0;
margin-bottom: 0;
overflow-x: auto;
}
code,
@ -220,7 +226,7 @@ pre code, pre kbd {
}
/* Styles */
/* */
blockquote {
border-left: 2px solid var(--bq-color);
padding: 0.1em 1em;