restic-systemd-automatic-backup | Automatic restic backup using Backblaze B2 storage | Continuous Backup library
kandi X-RAY | restic-systemd-automatic-backup Summary
kandi X-RAY | restic-systemd-automatic-backup Summary
Automatic restic backup using Backblaze B2 storage, systemd timers (or cron) and email notifications on failure.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of restic-systemd-automatic-backup
restic-systemd-automatic-backup Key Features
restic-systemd-automatic-backup Examples and Code Snippets
Community Discussions
Trending Discussions on Continuous Backup
QUESTION
ANSWER
Answered 2022-Feb-22 at 10:59I am not sure if you have seen this message in the portal when you created the account/also mentioned in the doc
"You will not be able to switch between the backup policies after the account has been created"
since you need to select either "Periodic" or "Continuous" at the creation of Cosmos Account, it becomes mandatory.
Update:
You will not see the above in portal anymore, you can Switch from "Periodic" to "Continous" on an existing account and that cannot be reverted. You can read more here.
QUESTION
What would be the consistency of the continuous backup of the write region if the database is using bounded staleness consistency? Will it be equivalent to strong consistent data assuming no failovers happened?
Thanks Guru
...ANSWER
Answered 2021-Nov-25 at 17:15Backups made from any secondary region will have data consistency defined by the guarantees provided by the consistency level chosen. In the case of strong consistency, all secondary region backups will have completely consistent data.
Bounded staleness will have data that may have stale or inconsistent data inside the defined staleness window (minimum 300 seconds or 100k writes). Outside of that staleness window the data will be consistent.
Data for the weaker consistency levels will have no guarantees for consistency from backups in secondary regions.
QUESTION
MongoDB has deprecated the continuous back up of data. It has recommended using CPS (Cloud provider snapshots). As far as I understood, snapshots isn't really going to be effective compared to continuous backup coz, if system breaks, then we can only be able to restore the data till the previous snapshot which isn't gonna make the database up-to-date or close to it atleast.
Am I missing something here in my understanding?
...ANSWER
Answered 2020-May-19 at 10:12Cloud provider snapshots can be combined with point in time restore to give the recovery point objective you require. With oplog based restores you can get granularity of one second.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install restic-systemd-automatic-backup
Linux + Systemd
macOS + LaunchAgent
Windows + ScheduledTask
Cron - for any system having a cron daemon. Tested on FreeBSD and macOS.
Create B2 credentials as instructed below
Install config and scripts: $ sudo make install-systemd ☝ Note: sudo is required here, as some files are installed into system directories (/etc/ and /usr/bin). Have a look to the Makefile to know more.
Fill out configuration values (edit with sudo): /etc/restic/pw.txt - Contains the password (single line) to be used by restic to encrypt the repository files. Should be different than your B2 password! /etc/restic/_global.env.sh - Global environment variables. /etc/restic/default.env.sh - Profile specific environment variables (multiple profiles can be defined by copying to /etc/restic/something.env.sh). /etc/restic/backup_exclude.txt - List of file patterns to ignore. This will trim down your backup size and the speed of the backup a lot when done properly!
Initialize remote repo as described below
Configure how often back up should be made. Edit if needed OnCalendar in /usr/lib/systemd/system/restic-backup@.timer.
Enable automated backup for starting with the system (enable creates symlinks): $ sudo systemctl enable --now restic-backup@default.timer
And run an immediate backup if you want (if not, it will run on daily basis): $ sudo systemctl start restic-backup@default
Watch its progress with Systemd journal: $ journalctl -f --lines=50 -u restic-backup@default
Verify the backup $ sudo -i $ source /etc/restic/default.env.sh $ restic snapshots
(optional) Define multiple profiles: just make a copy of the default.env.sh and use the defined profile name in place of default to run backups or enable timers. Notice that the value after @ works as a parameter.
(optional) Enable the check job that verifies that the backups for the profile are all intact. $ sudo systemctl enable --now restic-check@default.timer
(optional) Setup email on failure as described here
LaunchAgent is the modern service scheduler in in macOS that uses Launchd. Launchd is the modern built-in service scheduler in macOS. It has support for running services as root (Daemon) or as a normal user (Agent). Here we set up an LauchAgent to be run as your normal user for starting regular backups.
This is one of may ways you can get restic and this backup script working on Windows:.
Install scoop
Install dependencies from a PowerShell with administrator privileges: powershell> scoop install restic make git
In a non-privileged PowerShell, start git-bash and clone this repo powershell> git-bash git-bash$ mkdir ~/src && cd ~/src/ git-bash$ git clone https://github.com/erikw/restic-systemd-automatic-backup.git && cd $(basename "$_" .git)
Install scripts, conf and the ScheduledTask git-bash$ make install-schedtask
Edit configs and initialize repo according to TL;DR section above git-bash$ vim /etc/restic/* git-bash$ source /etc/restic/default.env.sh git-bash$ restic init git-bash$ restic_backup.sh Note that you should use cygwin/git-bash paths e.g. in default.env.sh you can have export RESTIC_BACKUP_PATHS='/c/Users/<username>/My Documents'
Inspect the installed tasks and make a test run Open the app "Task Scheduler" (taskschd.msc) Go to the local "Task Scheduler Library" Right click on one of the newly installed tasks e.g. restic_backup and click "run". If the tasks are not there, maybe you opended it up before make install-schedtask: just close and start it again to refresh. Now a git-bash window should open running restic_backup.sh, and the next time the configured schedule hits!
With taskschd.msc you can easily start, stop, delete and configure the scheduled tasks to your liking.
If you want to run an all-classic cron job instead, do like this:.
Follow the main setup from Step-by-step and manual setup but skip the systemd parts.
etc/cron.d/restic: Depending on your system's cron, put this in /etc/cron.d/ or similar, or copy the contents to $(sudo crontab -e). The format of this file is tested under FreeBSD, and might need adaptions depending on your cron.
You can use $ make install-cron to copy it over to /etc/cron.d.
(Optional) bin/cron_mail: A wrapper for running cron jobs, that sends output of the job as an email using the mail(1) command.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page