Open mkubdev opened 10 months ago
If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our GitHub Organisation - we help and encourage each other to contribute to open source little and often :neckbeard:. Any questions let us know.
I'm curious about how this will be handled:
Also maybe i should shorten the title? Could be bad for the cards.
The Backstory about your Linux Metaphor
I'm used to host my code on GitHub. I like GitHub a lot. I have a also a self-hosted gitlab for private work. But ensuring safety and integrity of our codebases can be scarry (imagine GitHub being offline...). One effective way to safeguard your GitHub repositories is through regular backups, and what better way to automate this process than with a scheduled cronjob on your Linux machine?
💡 3-2-1 Backup Strategy:
The 3-2-1 backup strategy, a golden rule in data backup, emphasizes redundancy and versatility. It advocates for maintaining:
The original data on your local machine. A secondary copy on another storage device. A tertiary copy stored remotely, off-site, offering protection against catastrophic events like hardware failures or disasters.
Utilize diverse storage mediums, such as local drives and cloud repositories, to mitigate risks associated with a specific type of storage failure.
Ensure at least one backup is stored off-site to guard against location-specific risks like theft, fire, or natural disasters.
The Linux Story!
A simple guide /w GitHub CLI and Cron Jobs.
Prerequisite
You'll need this before starting to build the backup script.
Start by installing GitHub CLI on your machine. You can find installation instructions on the official GitHub CLI repository.
Type
gh auth login
. You'll be redirected to your browser to validate the authentication.Make the script!
Go somewhere on your machine, and create a file
backup_repos.sh
:Save the script, and make it executable:
Setup the Cronjob:
Open the crontab file for editing it:
Add a line to schedule the backup script to run weekly. For example, to run the backup every Sunday at 8 AM:
Save and exit.
Tada!
A Linux demo/repos link
No response
PayPal Link for Donation (Linux Storyteller)
No response