更新 2.sh

This commit is contained in:
lqs 2025-03-12 13:27:04 +08:00
parent 1762838cd8
commit c0feccb177

14
2.sh
View File

@ -17,4 +17,16 @@ curl -F 'master_pwd=Sj89061189' \
-F backup_file=@SJFZ_2025_1_2025-03-11_15-40-24.zip \
-F 'copy=true' \
-F 'name=SJFZ_2025_1' \
http://localhost:2025/web/database/restore
http://localhost:2025/web/database/restore
sudo -u postgres psql -d SJFZ2023 << EOF
SELECT id, name, store_fname
FROM ir_attachment
WHERE store_fname NOT LIKE '/%'
AND NOT EXISTS (
SELECT 1
FROM pg_ls_dir('/var/lib/odoo/.local/share/Odoo/filestore/SJFZ2023/' || left(store_fname,2))
AS files
WHERE files = right(store_fname, -3)
);
EOF