Skip to content

Instantly share code, notes, and snippets.

The objective here is to find all SegmentNotFoundException type corruption and remove it (as we don't have a valid backup)

Before running any of the below steps we created an index.json file (see the file below) which contains only the index definitions of the corrupted indexes.

  1. This generates the file indexing-results\index-definities.json
java -Xmx8g -jar oak-run-1.8.12.jar index --fds-path=crx-quickstart\repository\datastore crx-quickstart\repository\segmentstore --index-definitions
  1. From that file we copied only the definitions we needed and created index.json (file attached here )

Note that offline compaction requires a long duration of downtime from 30 minutes to 7 hours (and in extreme cases more time).

Offline Oak compaction with debug logging:

  1. Stop Oak / AEM
  2. Install the latest Oak hotfix to your AEM instance:
@jtdevops
jtdevops / AEMDevResources
Created May 12, 2022 16:54 — forked from thomasmorf/AEMDevResources
Adobe Experience Manager Resources for Developers
Documentation
-------------
AEM: https://helpx.adobe.com/support/experience-manager/6-4.html
API References
--------------
https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/reference-materials.html
@jtdevops
jtdevops / post-checkout
Created June 8, 2022 14:13 — forked from bartoszmajsak/post-checkout
Git hook to change mvn version
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
if [ -z "$MAIN_BRANCH" ]; then
MAIN_BRANCH="develop"
@jtdevops
jtdevops / prepare-commit-msg.sh
Created June 8, 2022 14:15 — forked from bartoszmajsak/prepare-commit-msg.sh
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@jtdevops
jtdevops / MediaDownloader.yaml
Created June 13, 2022 15:33 — forked from vnl/MediaDownloader.yaml
Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, Jackett, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes get_iplayer containers, which is not routed through the VPN.
version: "3"
services:
vpn:
image: qmcgaw/gluetun
container_name: vpn
cap_add:
- NET_ADMIN
ports:
- 8888:8888/tcp # HTTP proxy
- 8388:8388/tcp # Shadowsocks
@jtdevops
jtdevops / ansible_update_user.yml
Created December 8, 2022 14:49 — forked from trongnghia203/ansible_update_user.yml
Ansible: Add/update/remove user
---
# -----------------------------------------------------------------------------------------
# Purpose: To manage system users:
# - create/upadate a user who is allowed accessing via ssh connection
# - add public ssh-key of user into its authorized_keys
# - allow user to use sudo by putting a config into /etc/sudoers.d/
# - remove authorized_keys of inactive users
# - remove inactive users
# - remove sudo permission by removing its config file in /etc/sudoers.d/ if any
# Maintanance: Nghia Le [at] INFOTECHVIET
public class GuavaExamples {
private static final Log log = LogFactory.getLog(GuavaExamples.class);
public static void main(String[] args) {
// The MapMaker/CacheBuilder is my very favorite part of Guava
// In its most basic form, you can use it to specify default values for keys
final Map<String, List<Integer>> grades = new MapMaker()
.makeComputingMap(new Function<String, List<Integer>>() {
@jtdevops
jtdevops / curlPackageFilterRules.sh
Created December 16, 2022 15:36 — forked from nateyolles/curlPackageFilterRules.sh
AEM/CQ cURL: Adding include/exclude rules to package filters
# Adding include/exclude rules to CQ/AEM package filters through cURL.
# Through a simple search, you will find numerous lists of CQ/AEM cURL commands.
# However, I haven't seen an example of adding rules to package filters. The
# JSON "rules" key takes an array value. You can leave the array empty if you
# don't need to include any rules. The array is of JSON objects with a
# "modifier" key and value of "include" or "exclude", and a "pattern" key with
# your path or regular expression as the value.
# create package