Removed mklink for git
This commit is contained in:
		| @ -1,16 +1,25 @@ | ||||
| --- | ||||
| type: "note" | ||||
| created: "2024-04-23T13:33:44.514Z" | ||||
| updated: "2024-04-23T13:33:53.583Z" | ||||
| assigned: '' | ||||
| created: 2024-04-23T13:33:44.514Z | ||||
| progress: 0 | ||||
| tags: | ||||
|   - Duck | ||||
|   - Hosts | ||||
|   - LinkPC | ||||
|   - Immich | ||||
| type: note | ||||
| updated: 2024-08-05T21:46:20.918Z | ||||
| --- | ||||
|  | ||||
| # Immich | ||||
|  | ||||
| - [immich3757.ddns.net](https://immich3757.ddns.net) | ||||
| - [immich-native](https://github.com/arter97/immich-native) | ||||
| - [immich-distribution](https://immich-distribution.nsg.cc/) | ||||
|  | ||||
| ## Notes | ||||
|  | ||||
| ```bash | ||||
| # https://learn.microsoft.com/en-us/windows/wsl/wsl-config | ||||
| code-insiders .wslconfig | ||||
| ``` | ||||
|  | ||||
| @ -74,20 +83,51 @@ 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'; | ||||
| @ -97,8 +137,9 @@ postgres=# \q | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| # mkdir -p /var/lib/immich | ||||
| # nano /var/lib/immich/env | ||||
|  | ||||
|  | ||||
|  | ||||
| ``` | ||||
|  | ||||
| ```conf | ||||
| @ -129,60 +170,157 @@ postgres=# \q | ||||
| ``` | ||||
|  | ||||
| ```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 | ||||
| @ -201,8 +339,13 @@ 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 | ||||
| @ -371,7 +514,9 @@ WHERE "ownerId" = '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 | ||||
| ``` | ||||
| @ -440,7 +585,9 @@ LIMIT 1000; | ||||
| ``` | ||||
|  | ||||
| ```conf | ||||
| # https://immich.app/docs/administration/reverse-proxy#nginx-example-config | ||||
|  | ||||
|  | ||||
|  | ||||
| server { | ||||
|     server_name <public_url>; | ||||
|  | ||||
| @ -495,12 +642,16 @@ 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 | ||||
| @ -531,7 +682,9 @@ 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/ | ||||
| @ -564,13 +717,29 @@ 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 | ||||
| @ -641,102 +810,25 @@ wsl --import Ubuntu-Immich Ubuntu-Immich "L:\Ubuntu\Ubuntu-Immich-003.tar" | ||||
| ```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 | ||||
| @ -755,8 +847,42 @@ 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 | ||||
| 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 | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| ``` | ||||
|  | ||||
| ```bash | ||||
| @ -817,3 +943,7 @@ values ( | ||||
|     '1980-01-17' | ||||
| ); | ||||
| ``` | ||||
|  | ||||
| ```bash Sat Jun 15 2024 20:24:28 GMT-0700 (Mountain Standard Time) | ||||
| snap set immich-distribution haproxy-http-bind="*:8880" | ||||
| ``` | ||||
|  | ||||
		Reference in New Issue
	
	Block a user