820 lines
24 KiB
Markdown
820 lines
24 KiB
Markdown
---
|
|
type: "note"
|
|
created: "2024-04-23T13:33:44.514Z"
|
|
updated: "2024-04-23T13:33:53.583Z"
|
|
---
|
|
|
|
# Immich
|
|
|
|
- [immich-native](https://github.com/arter97/immich-native)
|
|
- [immich-distribution](https://immich-distribution.nsg.cc/)
|
|
|
|
```bash
|
|
# https://learn.microsoft.com/en-us/windows/wsl/wsl-config
|
|
code-insiders .wslconfig
|
|
```
|
|
|
|
```conf
|
|
[wsl2]
|
|
networkingMode=mirrored
|
|
```
|
|
|
|
```bash
|
|
sudo -i
|
|
apt update
|
|
apt-get upgrade -y
|
|
apt install -y software-properties-common
|
|
add-apt-repository ppa:deadsnakes/ppa
|
|
[enter]
|
|
apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libturbojpeg0-dev tzdata ffmpeg liblapack3 liblapack-dev libatlas-base-dev
|
|
python3 --version
|
|
apt-get remove -y python3
|
|
apt autoremove -y
|
|
python3 --version
|
|
apt install -y python3.12 -y
|
|
python3 --version
|
|
ls /usr/bin/python3*
|
|
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 2
|
|
update-alternatives --config python3
|
|
[enter]
|
|
python3 --version
|
|
exit
|
|
python3 --version
|
|
sudo apt-get install -y build-essential
|
|
apt-get install -y git gcc make openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev zlib1g-dev libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev tk-dev libssl-dev openssl libffi-dev
|
|
apt install pip -y
|
|
exit
|
|
exit
|
|
```
|
|
|
|
```bash
|
|
L:
|
|
cd Ubuntu
|
|
wsl --export Ubuntu "Ubuntu-Immich-001.tar"
|
|
wsl --unregister ubuntu
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-001.tar"
|
|
```
|
|
|
|
```yaml
|
|
Name: Ubuntu-Immich
|
|
Command Line: wsl.exe -d Ubuntu-Immich
|
|
Tab Title: Ubuntu-Immich
|
|
```
|
|
|
|
```bash
|
|
sudo -i
|
|
ip a
|
|
lsb_release -a
|
|
apt-get install links unzip git nano ncdu -y
|
|
apt install python3-venv python3-dev uuid-runtime -y
|
|
ncdu
|
|
timedatectl set-timezone America/Phoenix
|
|
timedatectl
|
|
nano /etc/hosts
|
|
```
|
|
|
|
```bash
|
|
# adduser \
|
|
# --home /var/lib/immich/home \
|
|
# --shell=/sbin/nologin \
|
|
# --no-create-home \
|
|
# --disabled-password \
|
|
# --disabled-login \
|
|
# immich
|
|
# mkdir -p /var/lib/immich
|
|
# chown immich:immich /var/lib/immich
|
|
# chmod 700 /var/lib/immich
|
|
```
|
|
|
|
```bash
|
|
# KeePass F1D73A6C69F5EF45820A9083F8FA9A17, 8dc6bGn170WCCpCD+PqaFw==
|
|
sudo -u postgres psql
|
|
postgres=# create database immich;
|
|
postgres=# create user immich with encrypted password 'YOUR_STRONG_RANDOM_PW';
|
|
postgres=# grant all privileges on database immich to immich;
|
|
postgrse=# ALTER USER immich WITH SUPERUSER;
|
|
postgres=# \q
|
|
```
|
|
|
|
```bash
|
|
# mkdir -p /var/lib/immich
|
|
# nano /var/lib/immich/env
|
|
```
|
|
|
|
```conf
|
|
; # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
|
|
|
|
; # Connection secret for postgres. You should change it to a random password
|
|
; DB_PASSWORD=0cwxfYh9TqhGwv2#NAPq
|
|
|
|
; # The values below this line do not need to be changed
|
|
; ###################################################################################
|
|
; NODE_ENV=production
|
|
|
|
; DB_USERNAME=immich
|
|
; DB_DATABASE_NAME=immich
|
|
; DB_VECTOR_EXTENSION=pgvector
|
|
|
|
; # The location where your uploaded files are stored
|
|
; UPLOAD_LOCATION=./library
|
|
|
|
; # The Immich version to use. You can pin this to a specific version like "v1.71.0"
|
|
; IMMICH_VERSION=release
|
|
|
|
; # Hosts & ports
|
|
; DB_HOSTNAME=127.0.0.1
|
|
; MACHINE_LEARNING_HOST=127.0.0.1
|
|
; IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003
|
|
; REDIS_HOSTNAME=127.0.0.1
|
|
```
|
|
|
|
```bash
|
|
# git clone https://github.com/arter97/immich-native.git
|
|
# ./install.sh
|
|
```
|
|
|
|
```bash
|
|
# sudo cp immich*.service /etc/systemd/system/
|
|
# sudo systemctl daemon-reload
|
|
# for i in immich*.service; do
|
|
# sudo systemctl enable $i
|
|
# sudo systemctl start $i
|
|
# done
|
|
```
|
|
|
|
```bash
|
|
# systemctl status immich.service
|
|
# systemctl status immich-microservices.service
|
|
# systemctl status immich-machine-learning.service
|
|
```
|
|
|
|
```bash
|
|
# snap set immich-distribution sync-enabled=true
|
|
# snap set immich-distribution sync="qFWDWRKpFvV9PA90FNuBQgFligkvmhKlrOKpXyi7m7s"
|
|
# journalctl -eu snap.immich-distribution.sync-*
|
|
```
|
|
|
|
```Powershell
|
|
# New-VHD -Path C:\wsl2-Images-7007a9df.vhdx -Dynamic -SizeBytes 120GB
|
|
# wsl -d Ubuntu --mount --vhd C:\wsl2-Images-7007a9df.vhdx --bare
|
|
```
|
|
|
|
```bash
|
|
# snap stop immich-distribution
|
|
# mkdir /var/snap/immich-distribution/common/pictures
|
|
# parted /dev/sdc print
|
|
# # Error: /dev/sdc: unrecognised disk label
|
|
# parted /dev/sdc mklabel msdos
|
|
# parted -a optimal /dev/sdc mkpart primary ext4 0% 100%
|
|
# lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT /dev/sdc
|
|
# mkfs.ext4 /dev/sdc1
|
|
# e2label /dev/sdc1 wsl2-Images-7007
|
|
# lsblk -o NAME,LABEL,FSTYPE,SIZE,MOUNTPOINT /dev/sdc
|
|
# mount UUID=ec3a0c70-6d49-461e-bada-86c312c178ab /var/snap/immich-distribution/common/pictures
|
|
# mount -l | grep wsl2-Images-7007
|
|
# touch /var/snap/immich-distribution/common/pictures/test
|
|
# ls /var/snap/immich-distribution/common/pictures/test
|
|
# # rm /var/snap/immich-distribution/common/pictures/test
|
|
# # umount /var/snap/immich-distribution/common/pictures
|
|
# cp /mnt/d/01-Offline-Backup/1-Images-A/Images-7007a9df/ /var/snap/immich-distribution/common/pictures
|
|
```
|
|
|
|
```bash
|
|
# https://meichthys.github.io/foss_photo_libraries/
|
|
snap install immich-distribution
|
|
# http://127.0.0.1:3001/
|
|
snap start immich-distribution
|
|
snap stop immich-distribution
|
|
systemctl status snap.immich-distribution.manager.service
|
|
snap get immich-distribution database-password
|
|
immich-distribution.psql -h 127.0.0.1 -U postgres -d immich
|
|
cat /mnt/d/8-Move/Immich/backups/immich_database_2024-04-25T220025.sql | immich-distribution.psql immich
|
|
```
|
|
|
|
```bash
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "C:\Users\phares\Ubuntu\Ubuntu-Immich-laptop-001.tar"
|
|
```
|
|
|
|
```bash
|
|
cat /mnt/d/8-Move/Immich/backups/immich_database_2024-04-25T220025.sql | immich-distribution.psql immich
|
|
snap stop immich-distribution
|
|
mv /var/snap/immich-distribution/common/upload /var/snap/immich-distribution/common/upload-old
|
|
ls -la /var/snap/immich-distribution/common
|
|
ls -la /var/snap/immich-distribution/common/upload-old
|
|
# rsync -r --info=progress2 /mnt/c/8-Move/Immich/upload/ /var/snap/immich-distribution/common
|
|
# freefilesync
|
|
mv /home/phares/upload/ /var/snap/immich-distribution/common
|
|
chown -R root:root /var/snap/immich-distribution/common
|
|
chown -R snap_daemon:snap_daemon /var/snap/immich-distribution/common/pgsql
|
|
snap start immich-distribution
|
|
systemctl status snap.immich-distribution.manager.service
|
|
journalctl -fu snap.immich-distribution.*
|
|
```
|
|
|
|
```bash
|
|
snap stop immich-distribution
|
|
mv /var/snap/immich-distribution/common/upload/ /home/mikep/Immich
|
|
chown -R mikep:mikep /home/mikep
|
|
chown -R mike:mike /var/snap/immich-distribution/pictures
|
|
chown -R root:root /var/snap/immich-distribution/pictures
|
|
immich-distribution.backup -d
|
|
cat /home/phares/Immich/backups/immich_database_2024-04-28T213218.sql | immich-distribution.psql immich
|
|
mv /var/snap/immich-distribution/common/upload/ /home/phares/Immich
|
|
chown -R phares:phares /home/phares/Immich
|
|
mv /home/phares/Immich/upload/ /var/snap/immich-distribution/common
|
|
chown -R root:root /var/snap/immich-distribution/common/upload
|
|
```
|
|
|
|
- [x] Move images from camera to "D:/7-Question/iCloud Photos 2024"
|
|
- [x] Run Rename from "L:/Git/AA"
|
|
- [x] Move images from "D:/7-Question/iCloud Photos 2024" to "D:/1-Images-A/Images-7007a9df"
|
|
- [x] Run Instance from "L:/Git/View-by-Distance-MKLink-Console"
|
|
- [x] Switch to Ubuntu
|
|
- [x] Stop Immich process
|
|
- [x] Mount ProgramFiles (correct one)
|
|
- [x] change owner of /var/snap/immich-distribution/pictures to mike
|
|
- [x] Use FreeFileSync to sync '/mnt/ProgramFiles/1-Images-A/Images-7007a9df-Results/C)Resize/7007a9df/Original/()' with /var/snap/immich-distribution/pictures
|
|
- [x] change owner of /var/snap/immich-distribution/pictures to root
|
|
- [x] Start Immich process
|
|
- [x] Use web GUI - Administration - External Libraries - Scan new Library Files
|
|
- [x] Match faces in new images
|
|
- [x] Queue jobs to find more
|
|
- [x] Backup database
|
|
- [x] Run Backups-Immich-local, Upload-Immich-local, Backup-Immich-server and Upload-Immich-server FreeFileSync files
|
|
- [2] Switch to Windows
|
|
- [2] Run Syncthing-Immich-Server FreeFileSync file
|
|
- [2] Used Windows to un-compress .sql.xz
|
|
- [2] Push sql
|
|
- [2] Stop Immich process
|
|
- [2] Move upload to home
|
|
- [2] change owner
|
|
- [2] sync
|
|
- [2] Move back to var from home
|
|
- [2] change owner back
|
|
- [2] Start Immich process
|
|
|
|
```json ckolkman.vscode-postgres
|
|
{
|
|
"label": "127.0.0.1",
|
|
"host": "127.0.0.1",
|
|
"user": "postgres",
|
|
"port": 5432,
|
|
"ssl": false,
|
|
"database": "immich",
|
|
"passwordX": "UFvfjMpvcHpkLtDwebWx",
|
|
"passwordXX": "AsKiBXwEEHZEwaXkrnMI",
|
|
"passwordXXX": "YPSjzpREpyHQjdeUJZil",
|
|
"passwordXXXX": "eYuaUZnJYFRgCJPcHnSH"
|
|
}
|
|
```
|
|
|
|
```bash does't work
|
|
immich-distribution.psql -h 127.0.0.1 -U postgres -d immich -qAtX -c "select json_agg(t) FROM (SELECT * from assets) t;" -o /var/snap/immich-distribution/common/backups/data.json
|
|
immich-distribution.psql -h 127.0.0.1 -U postgres -d immich
|
|
```
|
|
|
|
```sql doesn't work
|
|
\t
|
|
\a
|
|
\o file.json
|
|
SELECT row_to_json(r) FROM assets AS r;
|
|
```
|
|
|
|
- Sun May 12 2024 09:22:30 GMT-0700 (Mountain Standard Time)
|
|
|
|
- [x] Move images from google takeout to "D:/7-Question/iCloud Photos 2024"
|
|
- [x] Run Rename from "L:/Git/AA"
|
|
- [x] Move images from "D:/7-Question/iCloud Photos 2024" to "D:/1-Images-A/Images-7007a9df"
|
|
- [x] Run Instance from "L:/Git/View-by-Distance-MKLink-Console"
|
|
- [x] Switch to Ubuntu
|
|
- [x] Use FreeFileSync as sudo to sync '/mnt/ProgramFiles/1-Images-A/Images-7007a9df-Results/C)Resize/7007a9df/Original/()' with /var/snap/immich-distribution/pictures
|
|
- [x] change owner of /var/snap/immich-distribution/pictures to root
|
|
- [x] Use web GUI - Administration - External Libraries - Scan new Library Files
|
|
- [x] Queue jobs to find more
|
|
- [x] Backup database
|
|
|
|
```bash
|
|
sudo -i
|
|
immich-distribution.backup -d
|
|
```
|
|
|
|
- [x] Used ubuntu-desktop to un-compress .sql.xz
|
|
- [x] Run Backups-Immich-local, Upload-Immich-local, Backup-Immich-server and Upload-Immich-server FreeFileSync files
|
|
- [1] Switch to Windows
|
|
- [1] Run Syncthing-Immich-Server FreeFileSync file
|
|
- [1] Stop Ubuntu-Immich process
|
|
|
|
```bash
|
|
snap stop immich-distribution
|
|
mv /var/snap/immich-distribution/common/upload/ /home/mikep/Immich
|
|
mv /var/snap/immich-distribution/common/backups/ /home/mikep/Immich
|
|
chown -R mikep:mikep /home/mikep/Immich
|
|
```
|
|
|
|
- [1] Run wsl-Immich-d FreeFileSync file
|
|
|
|
```bash
|
|
mv /home/mikep/Immich/backups/ /var/snap/immich-distribution/common
|
|
chown -R root:root /var/snap/immich-distribution/common/backups
|
|
mv /home/mikep/Immich/upload/ /var/snap/immich-distribution/common
|
|
chown -R root:root /var/snap/immich-distribution/common/upload
|
|
snap start immich-distribution
|
|
```
|
|
|
|
- [1] Push sql
|
|
|
|
```bash
|
|
sudo -i
|
|
cat /var/snap/immich-distribution/common/backups/immich_database_2024-05-12T085737.sql | immich-distribution.psql immich
|
|
```
|
|
|
|
```sql Sun May 12 2024 10:32:45 GMT-0700 (Mountain Standard Time)
|
|
SELECT json_agg(t)
|
|
FROM (
|
|
SELECT "id",
|
|
"deviceAssetId",
|
|
replace("originalPath", '/var/snap/immich-distribution/pictures', '') "originalPath",
|
|
replace("previewPath", '/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593', '') "previewPath",
|
|
-- "fileCreatedAt",
|
|
-- "fileModifiedAt",
|
|
"isFavorite",
|
|
-- "duration",
|
|
replace("thumbnailPath", '/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593', '') "thumbnailPath",
|
|
-- "encodedVideoPath",
|
|
-- "checksum",
|
|
-- "livePhotoVideoId",
|
|
-- "updatedAt",
|
|
-- "createdAt",
|
|
-- "sidecarPath",
|
|
"thumbhash"
|
|
-- "libraryId",
|
|
-- "localDateTime",
|
|
-- "stackId"
|
|
FROM "assets"
|
|
WHERE "ownerId" = 'fc9fd5a1-d1b3-4080-a21c-daf9b1c24593'
|
|
AND "deviceId" = 'Library Import'
|
|
AND "type" = 'IMAGE'
|
|
AND "isVisible" = true
|
|
AND "isArchived" = false
|
|
AND "isReadOnly" = true
|
|
AND "isOffline" = false
|
|
AND "isExternal" = true
|
|
AND "deletedAt" is null
|
|
AND "originalFileName" = "deviceAssetId"
|
|
-- LIMIT 50
|
|
) t;
|
|
```
|
|
|
|
```vscode
|
|
/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593
|
|
```
|
|
|
|
```bash
|
|
ln -s /var/log/nginx /var/www/html/log-nginx
|
|
# ln -s /home/syncthing/Immich/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593 /var/www/html/Images-c9dbce3b-Results/thumbs
|
|
cp -R /home/syncthing/Immich/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/ /var/www/html/Images-c9dbce3b-Results/thumbs
|
|
ls -la /var/www/html/Images-c9dbce3b-Results
|
|
```
|
|
|
|
```sql Sun May 12 2024 16:57:04 GMT-0700 (Mountain Standard Time)
|
|
SELECT "assetId",
|
|
"personId",
|
|
-- "embedding",
|
|
"imageWidth",
|
|
"imageHeight",
|
|
"boundingBoxX1",
|
|
"boundingBoxY1",
|
|
"boundingBoxX2",
|
|
"boundingBoxY2",
|
|
"id"
|
|
FROM "asset_faces"
|
|
LIMIT 1000;
|
|
```
|
|
|
|
```sql Sun May 12 2024 16:57:04 GMT-0700 (Mountain Standard Time)
|
|
SELECT "id",
|
|
"createdAt",
|
|
"updatedAt",
|
|
"ownerId",
|
|
"name",
|
|
"thumbnailPath",
|
|
"isHidden",
|
|
"birthDate",
|
|
"faceAssetId"
|
|
FROM "person"
|
|
LIMIT 1000;
|
|
```
|
|
|
|
```sql Sun May 12 2024 16:57:04 GMT-0700 (Mountain Standard Time)
|
|
SELECT "assetId",
|
|
"make",
|
|
"model",
|
|
"exifImageWidth",
|
|
"exifImageHeight",
|
|
"fileSizeInByte",
|
|
"orientation",
|
|
"dateTimeOriginal",
|
|
"modifyDate",
|
|
"lensModel",
|
|
"fNumber",
|
|
"focalLength",
|
|
"iso",
|
|
"latitude",
|
|
"longitude",
|
|
"city",
|
|
"state",
|
|
"country",
|
|
"description",
|
|
"fps",
|
|
"exposureTime",
|
|
"livePhotoCID",
|
|
"timeZone",
|
|
"exifTextSearchableColumn",
|
|
"projectionType",
|
|
"profileDescription",
|
|
"colorspace",
|
|
"bitsPerSample",
|
|
"autoStackId"
|
|
FROM "exif"
|
|
LIMIT 1000;
|
|
```
|
|
|
|
```conf
|
|
# https://immich.app/docs/administration/reverse-proxy#nginx-example-config
|
|
server {
|
|
server_name <public_url>;
|
|
|
|
# allow large file uploads
|
|
client_max_body_size 50000M;
|
|
|
|
# Set headers
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# enable websockets: http://nginx.org/en/docs/http/websocket.html
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_redirect off;
|
|
|
|
# set timeout
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
send_timeout 600s;
|
|
|
|
location / {
|
|
proxy_pass http://<backend_url>:2283;
|
|
}
|
|
}
|
|
```
|
|
|
|
```bash
|
|
L:
|
|
cd Ubuntu
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-003.tar"
|
|
```
|
|
|
|
```bash
|
|
snap stop immich-distribution
|
|
cp -R /mnt/d/7-Question/papa/ /var/snap/immich-distribution/common/pictures
|
|
chown -R root:root /var/snap/immich-distribution/common/pictures
|
|
snap start immich-distribution
|
|
systemctl status snap.immich-distribution.manager.service
|
|
journalctl -fu snap.immich-distribution.*
|
|
snap refresh --hold=forever immich-distribution
|
|
cp -R /var/snap/immich-distribution/common/upload/thumbs/5e47f15f-0447-4283-9c3d-6b61ff79ebb5/ /mnt/l/
|
|
immich-distribution.backup -d
|
|
cp -R /var/snap/immich-distribution/common/backups/ /mnt/l/
|
|
```
|
|
|
|
```bash
|
|
L:
|
|
cd Ubuntu
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
# wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman.tar"
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-003.tar"
|
|
```
|
|
|
|
```bash
|
|
# /mnt/d/3-Videos-A/Device-Videos-2_0_0_3-Current-Year/Have-Media-Created
|
|
snap refresh --hold=forever immich-distribution
|
|
cp -R /var/snap/immich-distribution/common/upload/thumbs/5e47f15f-0447-4283-9c3d-6b61ff79ebb5/ /mnt/l/
|
|
immich-distribution.backup -d
|
|
cp -R /var/snap/immich-distribution/common/backups/ /mnt/l/
|
|
cp -R /var/snap/immich-distribution/common/upload/encoded-video/5e47f15f-0447-4283-9c3d-6b61ff79ebb5/ /mnt/l/
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Videos.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
```
|
|
|
|
```bash
|
|
L:
|
|
cd Ubuntu
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman.tar"
|
|
```
|
|
|
|
```bash
|
|
snap stop immich-distribution
|
|
ls /var/snap/immich-distribution/common/pictures/ -1 | wc -l
|
|
mv /var/snap/immich-distribution/common/pictures/ /home/mikep/
|
|
chown -R mikep:mikep /home/mikep
|
|
ls /home/mikep/pictures/ -1 | wc -l
|
|
mv /home/mikep/pictures/ /var/snap/immich-distribution/common/
|
|
chown -R root:root /var/snap/immich-distribution/common/pictures
|
|
ls /var/snap/immich-distribution/common/pictures/ -1 | wc -l
|
|
snap start immich-distribution
|
|
systemctl status snap.immich-distribution.manager.service
|
|
# Queue jobs
|
|
cp -R /var/snap/immich-distribution/common/upload/thumbs/5e47f15f-0447-4283-9c3d-6b61ff79ebb5/ /mnt/l/
|
|
immich-distribution.backup -d
|
|
cp -R /var/snap/immich-distribution/common/backups/ /mnt/l/
|
|
snap stop immich-distribution
|
|
mv /var/snap/immich-distribution/common/pictures/ /home/mikep/
|
|
snap start immich-distribution
|
|
snap stop immich-distribution
|
|
mv /home/mikep/pictures/ /var/snap/immich-distribution/common/
|
|
snap start immich-distribution
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman-002.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman-002.tar"
|
|
```
|
|
|
|
```bash
|
|
snap stop immich-distribution
|
|
rm -R /var/snap/immich-distribution/common/pictures
|
|
snap start immich-distribution
|
|
exit
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman-003.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman-003.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
```
|
|
|
|
```bash
|
|
# ls /mnt/d/01-Offline-Backup/2-Images-B/Norman-Herman-Immich/tiff
|
|
# mkdir -p /mnt/disk
|
|
# mount -o loop /mnt/d/01-Offline-Backup/2-Images-B/Norman-Herman-Immich/tiff/tiff.iso /mnt/disk
|
|
# mount -t iso9660 E: /mnt/disk
|
|
# mount -t drvfs E: /mnt/disk
|
|
# umount /mnt/disk
|
|
# umount /mnt/disk
|
|
```
|
|
|
|
```sql
|
|
-- update assets
|
|
-- set "originalPath" = replace("originalPath",
|
|
-- '/var/snap/immich-distribution/common/pictures',
|
|
-- '/mnt/disk')
|
|
-- WHERE "originalPath" like '%var%';
|
|
-- SELECT * FROM "assets" LIMIT 1000;
|
|
```
|
|
|
|
```bash
|
|
L:
|
|
cd Ubuntu
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-003.tar"
|
|
```
|
|
|
|
- [ ] FreeFileSync - wsl-Immich-home-View-by-Distance-Test
|
|
|
|
```xml
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<FreeFileSync XmlType="GUI" XmlFormat="23">
|
|
<Notes/>
|
|
<Compare>
|
|
<Variant>TimeAndSize</Variant>
|
|
<Symlinks>Exclude</Symlinks>
|
|
<IgnoreTimeShift/>
|
|
</Compare>
|
|
<Synchronize>
|
|
<Changes>
|
|
<Left Create="right" Update="right" Delete="right"/>
|
|
<Right Create="left" Update="left" Delete="left"/>
|
|
</Changes>
|
|
<DeletionPolicy>Permanent</DeletionPolicy>
|
|
<VersioningFolder Style="Replace"/>
|
|
</Synchronize>
|
|
<Filter>
|
|
<Include>
|
|
<Item>*</Item>
|
|
</Include>
|
|
<Exclude>
|
|
<Item>\System Volume Information\</Item>
|
|
<Item>\$Recycle.Bin\</Item>
|
|
<Item>\RECYCLE?\</Item>
|
|
<Item>\Recovery\</Item>
|
|
<Item>*\thumbs.db</Item>
|
|
<Item>*.Identifier |</Item>
|
|
</Exclude>
|
|
<SizeMin Unit="None">0</SizeMin>
|
|
<SizeMax Unit="None">0</SizeMax>
|
|
<TimeSpan Type="None">0</TimeSpan>
|
|
</Filter>
|
|
<FolderPairs>
|
|
<Pair>
|
|
<Left>L:\Git\View-by-Distance-Test\Images-Results\C)Resize\c9dbce3b\Original\()</Left>
|
|
<Right>\\wsl.localhost\Ubuntu-Immich\home\mikep\pictures</Right>
|
|
</Pair>
|
|
</FolderPairs>
|
|
<Errors Ignore="false" Retry="0" Delay="5"/>
|
|
<PostSyncCommand Condition="Completion"/>
|
|
<LogFolder/>
|
|
<EmailNotification Condition="Always"/>
|
|
<GridViewType>Action</GridViewType>
|
|
</FreeFileSync>
|
|
```
|
|
|
|
```bash
|
|
chown -R mikep:mikep /home/mikep/
|
|
snap refresh --hold=forever immich-distribution
|
|
# View-by-Distance-Test
|
|
# /home/mikep/pictures
|
|
# Scan All Libraries
|
|
# http://127.0.0.1:3001/admin/server-status
|
|
# http://127.0.0.1:3001/admin/jobs-status
|
|
exit
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-View-by-Distance-Test-003.tar"
|
|
# Added more pictures with wsl-Immich-home
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-View-by-Distance-Test-004.tar"
|
|
# Added more pictures with wsl-Immich-home
|
|
```
|
|
|
|
- [ ] FreeFileSync - wsl-Immich-var-View-by-Distance-Test
|
|
|
|
```xml
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<FreeFileSync XmlType="GUI" XmlFormat="23">
|
|
<Notes/>
|
|
<Compare>
|
|
<Variant>TimeAndSize</Variant>
|
|
<Symlinks>Exclude</Symlinks>
|
|
<IgnoreTimeShift/>
|
|
</Compare>
|
|
<Synchronize>
|
|
<Changes>
|
|
<Left Create="right" Update="right" Delete="right"/>
|
|
<Right Create="left" Update="left" Delete="left"/>
|
|
</Changes>
|
|
<DeletionPolicy>Permanent</DeletionPolicy>
|
|
<VersioningFolder Style="Replace"/>
|
|
</Synchronize>
|
|
<Filter>
|
|
<Include>
|
|
<Item>*</Item>
|
|
</Include>
|
|
<Exclude>
|
|
<Item>\System Volume Information\</Item>
|
|
<Item>\$Recycle.Bin\</Item>
|
|
<Item>\RECYCLE?\</Item>
|
|
<Item>\Recovery\</Item>
|
|
<Item>*\thumbs.db</Item>
|
|
<Item>*.Identifier |</Item>
|
|
</Exclude>
|
|
<SizeMin Unit="None">0</SizeMin>
|
|
<SizeMax Unit="None">0</SizeMax>
|
|
<TimeSpan Type="None">0</TimeSpan>
|
|
</Filter>
|
|
<FolderPairs>
|
|
<Pair>
|
|
<Left>L:\Git\View-by-Distance-Test\Images-Results\C)Resize\c9dbce3b\immich</Left>
|
|
<Right>\\wsl.localhost\Ubuntu-Immich\var\snap\immich-distribution\common\upload\thumbs\5e47f15f-0447-4283-9c3d-6b61ff79ebb5</Right>
|
|
</Pair>
|
|
</FolderPairs>
|
|
<Errors Ignore="false" Retry="0" Delay="5"/>
|
|
<PostSyncCommand Condition="Completion"/>
|
|
<LogFolder/>
|
|
<EmailNotification Condition="Always"/>
|
|
<GridViewType>Action</GridViewType>
|
|
</FreeFileSync>
|
|
```
|
|
|
|
```bash
|
|
rm -R /home/mikep/pictures/
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-View-by-Distance-Test-005.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-View-by-Distance-Test-005.tar"
|
|
# Added more pictures with wsl-Immich-home
|
|
```
|
|
|
|
```bash
|
|
rm -R /home/mikep/pictures/
|
|
```
|
|
|
|
```bash
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-View-by-Distance-Test-006.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
L:
|
|
cd Ubuntu
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-003.tar"
|
|
```
|
|
|
|
- [ ] FreeFileSync - wsl-Immich-home-Videos-A-Device-Videos-2_0_0_3-Current-Year
|
|
|
|
```bash
|
|
# Videos-A
|
|
# /home/mikep/videos
|
|
# Scan All Libraries
|
|
# http://127.0.0.1:3001/admin/server-status
|
|
# http://127.0.0.1:3001/admin/jobs-status
|
|
```
|
|
|
|
```bash
|
|
L:
|
|
cd Ubuntu
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Videos-004.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Videos-004.tar"
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Videos-005.tar"
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman-004.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --export Ubuntu "Ubuntu-Immich-001.tar"
|
|
wsl --unregister Ubuntu
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-001.tar"
|
|
```
|
|
|
|
```bash
|
|
cat /var/snap/immich-distribution/common/backups/immich_database_2024-05-13T113720.sql | immich-distribution.psql immich
|
|
# cat /var/snap/immich-distribution/common/backups/immich_database_2024-05-12T085737.sql | immich-distribution.psql immich
|
|
# cat /var/snap/immich-distribution/common/backups/immich_database_2024-04-28T213218.sql | immich-distribution.psql immich
|
|
```
|
|
|
|
```bash
|
|
wsl --export Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Phares-001.tar"
|
|
wsl --unregister Ubuntu-Immich
|
|
```
|
|
|
|
```bash
|
|
cd C:/6-Other-Large-C
|
|
wsl --unregister Ubuntu-Immich
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Videos-005.tar"
|
|
```
|
|
|
|
```bash
|
|
wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-Norman-Herman-004.tar
|
|
```
|
|
|
|
```bash
|
|
immich-distribution.backup -d
|
|
```
|
|
|
|
- [x] Windows \\wsl.localhost\Ubuntu-Immich copy and unzip .sql.zx
|
|
|
|
```bash
|
|
wsl --unregister Ubuntu-Immich
|
|
pscp -i "C:\Users\phares\.ssh\id_ed25519.ppk" D:/8-Move/immich_database_2024-05-17T173401.sql root@free.file.sync.root:/var/snap/immich-distribution/common/backups/immich_database_2024-05-17T173401.sql
|
|
```
|
|
|
|
```bash
|
|
cat /var/snap/immich-distribution/common/backups/immich_database_2024-05-17T173401.sql | immich-distribution.psql immich
|
|
```
|
|
|
|
```sql
|
|
select "id",
|
|
"createdAt",
|
|
"updatedAt",
|
|
"ownerId",
|
|
"name",
|
|
"thumbnailPath",
|
|
"isHidden",
|
|
"birthDate",
|
|
"faceAssetId"
|
|
from "person"
|
|
where "ownerId" = 'c76905af-c06a-4a78-a9a7-c32f5b58e793'
|
|
and "ownerId" != '37c59a99-2c1f-4580-89aa-0bd70a437363'
|
|
limit 1000;
|
|
```
|
|
|
|
```sql
|
|
insert into "person" (
|
|
"ownerId",
|
|
"name",
|
|
"birthDate"
|
|
)
|
|
values (
|
|
'c76905af-c06a-4a78-a9a7-c32f5b58e793',
|
|
'Mike Phares',
|
|
'1980-01-17'
|
|
);
|
|
```
|