- Upgrade Radarr to at least v4.1.0.6133 or newer. This brings in support for Postgres. This will also ensure that all of your SQLite tables have the latest schema migrations applied before we migrate to Postgres. If you want to upgrade further, that's fine too, but make sure you've completed all upgrades first before continuing.
- Create your Postgres databases (one for the "main" database and one for the "logs" database) and configure Radarr with the relevant Postgres credentials. Both databases need to be owned by/accessible from the same Postgres user.
- Restart Radarr, and ensure it connects to Postgres and runs all schema migrations.
- Once all schema migrations have been applied, and no other activity is occurring, stop Radarr.
- Copy the SQLite databases from the Radarr instance/pod, both the main database and logs database. For this guide, we'll assume these files are called
radarr.db
andlogs.db
. - Using
pg_dump -s
, dump the schema for the main Radarr database . P
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{mem::ManuallyDrop, ops::Deref, slice::from_raw_parts, str::from_utf8_unchecked}; | |
use crate::interning::InternedString; | |
const OWNED_PTR_TAG: usize = 0xFF00_0000_0000_0000; | |
#[repr(C)] | |
#[derive(Clone, Copy)] | |
struct OwnedUnion { | |
cap: usize, // Field one. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loom::model(|| { | |
// These lines are purely to set up the necessary data structures: | |
let interner = FixedSizeInterner::new(NonZeroUsize::new(1024).unwrap()); | |
let t1_interned_s = interner.try_intern(STRING_TO_INTERN).expect("should not fail to intern"); | |
assert_eq!(t1_interned_s.deref(), STRING_TO_INTERN); | |
// Now we spawn our second thread, meant to run concurrently with our "first" thread, which is the code | |
// that comes _after_ the call to `loom::thread::spawn`: | |
let t2_result = loom::thread::spawn(move || { | |
interner.try_intern(STRING_TO_INTERN).expect("should not fail to intern") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Atomic smart pointer that supports replacing itself. | |
/// | |
/// ## Metric handles and expiration | |
/// | |
/// In metric handles, we have to deal with the potential that a registry expires a metric, which | |
/// could otherwise leave a handle attached to a metric that is reported nowhere. In order to handle | |
/// this, we need the ability to be able to reset/update the internal field that holds the smart | |
/// pointer reference to the inner data, which requires a mechanism for interior mutability given | |
/// the immutable references by which handles are accessed through. | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "quanta-stdlib-deviation" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
quanta = "0.12.1" | |
hdrhistogram = "7.5.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -euo pipefail | |
ACME_SH_HOME="/data/acme.sh" | |
ACME_SERVER="https://acme.zerossl.com/v2/DV90" | |
contains() { | |
if [ "$1" ] && [ "$2" ] && [ -z "${1##*"$2"*}" ]; | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with defaults: Some(Array [String("*")]) | |
with multiple_outputs=true: Some(Array [String("logs"), String("metrics"), String("traces")]) | |
with multiple_outputs=true, disable_traces=true: Some(Array [String("logs"), String("metrics")]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_nested_object_property_schema(schema, property_name) | |
@logger.debug "Starting search for nested property '#{property_name}'" | |
@logger.debug "Starting schema: #{JSON.dump(get_reduced_schema(schema))}" | |
# See if we're checking an object schema directly. | |
if !schema['properties'].nil? | |
@logger.debug "Schema is object, checking properties directly." | |
return schema['properties'][property_name] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ghcr.io/goauthentik/server:2022.9.0 | |
USER root | |
RUN sed -i -e 's# > /dev/stderr##g' /lifecycle/ak | |
USER authentik | |
ENTRYPOINT ["/lifecycle/ak"] | |
CMD ["server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: '3.4' | |
services: | |
postgresql: | |
image: docker.io/library/postgres:12-alpine | |
restart: unless-stopped | |
network_mode: host | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] |
NewerOlder