Thanks for the command, i want to use this command, to export my documents in paperless-ng with a ?weekly? cron job into my home share, which backups to backblaze. However, i would like to get the cron job as automatic as possible, do you know a solution to get always the correct pod name behind exec -ti <pod_name> ?
Do you know a better way than running this crappy command:
k3s kubectl -n ix-paperless-ng exec -ti $(k3s kubectl -n ix-paperless-ng get pods | tail -n 1 | cut -d " " -f 1) -- document_exporter
It works, but it may be not the smartest thing to do...
root@truenas[~]# k3s kubectl -n ix-paperless-ng exec -ti $(k3s kubectl -n ix-paperless-ng get pods | tail -n 1 | cut -d " " -f 1) -- document_exporter
Defaulted container "paperless-ng" out of: paperless-ng, autopermissions (init), hostpatch (init), postgresql-init (init)
usage: manage.py document_exporter [-h] [-c] [-f] [-d] [--no-progress-bar] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color]
[--skip-checks]
target
manage.py document_exporter: error: the following arguments are required: target
command terminated with exit code 2