dietpi-sync - run more often/continously? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
hoverdonkey
Posts: 17
Joined: Sun Jul 12, 2020 2:32 pm

Re: dietpi-sync - run more often/continously?

Post by hoverdonkey »

Joulinar wrote: Tue Mar 16, 2021 11:23 pm yes I noticed the same. I will contact developer depending on my test this night
I just added an edit to previous post:

EDIT: to clarify - the sync will proceed on pressing Enter for all permutations of of Sync: Continue with sync (either <Ok> or <Cancel>) or Cancel : Abort sync, no changes will be made (either <Ok> or <Cancel>).
User avatar
Joulinar
Posts: 4203
Joined: Sat Nov 16, 2019 12:49 am

Re: dietpi-sync - run more often/continously?

Post by Joulinar »

I know
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
hoverdonkey
Posts: 17
Joined: Sun Jul 12, 2020 2:32 pm

Re: dietpi-sync - run more often/continously?

Post by hoverdonkey »

Joulinar wrote: Tue Mar 16, 2021 10:05 am Hi,

once you configured dietpi-sync, you could try to put the sync scipt into crontab and to have it executed every x minutes.

Code: Select all

/boot/dietpi/dietpi-sync 1
I still do not know if I have done this correctly so have not been able to check if this would work (i.e. to check it would bypass the blocking behaviour we just found).

Was I correct in creating a file with the single line /boot/dietpi/dietpi-sync 1 in it, in directory /etc/cron.minutely. Or was I supposed to do something with crontab -e (which I would have no idea what to do with!)?

I really appreciate your support and guidance so far, thank you.
User avatar
Joulinar
Posts: 4203
Joined: Sat Nov 16, 2019 12:49 am

Re: dietpi-sync - run more often/continously?

Post by Joulinar »

Was I correct in creating a file with the single line /boot/dietpi/dietpi-sync 1 in it, in directory /etc/cron.minutely.
what is the name of the file you created?
And did you assigned execute permission?
As well did you activate cron.minutely by running dietpi-cron
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
hoverdonkey
Posts: 17
Joined: Sun Jul 12, 2020 2:32 pm

Re: dietpi-sync - run more often/continously?

Post by hoverdonkey »

Joulinar wrote: Tue Mar 16, 2021 11:43 pm
Was I correct in creating a file with the single line /boot/dietpi/dietpi-sync 1 in it, in directory /etc/cron.minutely.
what is the name of the file you created?
And did you assigned execute permission?
As well did you activate cron.minutely by running dietpi-cron
I called the file qbitsync.
I hadn't assigned execute, but I have now.
Yes, I did activate that.
hoverdonkey
Posts: 17
Joined: Sun Jul 12, 2020 2:32 pm

Re: dietpi-sync - run more often/continously?

Post by hoverdonkey »

I've got it working! I copied the file /etc/cron.daily/dietpi into /etc/cron.minutely, renamed it (to avoid confusion) and made it executable. The minutely sync now works. Apologies if this is what you meant in your first post of the thread.

Only problem is that (only now do) I see that it doesn't quite do what I want! When I remove files from the destination folder (i.e. move them to where I want them) they reappear with the next sync, which is to be expected (ain't hindsight wonderful!) Now, if only I could tell it only to to sync stuff that is less than a minute old!
hoverdonkey
Posts: 17
Joined: Sun Jul 12, 2020 2:32 pm

Re: dietpi-sync - run more often/continously?

Post by hoverdonkey »

Just to report in that I'm getting closer to my goal.

I started looking at the Qbittorrent "Run external programme on completion" box as suggested in an early post. Putting cp -r "%F" "/mnt/NFS_path" in the box successfully copies the just completed files with their path to where i want them. However, the copied files have permissions that stop them being moved/deleted in my Windows File Explorer. Back in dietpi terminal, running the command chmod 777 -R "/mnt/NASSY_NFS_Video/aqBittorrentdone" fixes this. However, I do not know how to combine the two commands so they can both run automatically. I have read that a script is required but so far my attempts have failed. I'll keep grinding away...
User avatar
Joulinar
Posts: 4203
Joined: Sat Nov 16, 2019 12:49 am

Re: dietpi-sync - run more often/continously?

Post by Joulinar »

what user/permissions the files have once moved by Qbittorrent external command?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
hoverdonkey
Posts: 17
Joined: Sun Jul 12, 2020 2:32 pm

Re: dietpi-sync - run more often/continously?

Post by hoverdonkey »

Joulinar wrote: Wed Mar 17, 2021 9:11 pm what user/permissions the files have once moved by Qbittorrent external command?


Group: dietpi [1000]
Owner: qbittorrent [999]

The main folder is drwxrwxr-x
The files within are -rw-rw-r--
User avatar
Joulinar
Posts: 4203
Joined: Sat Nov 16, 2019 12:49 am

Re: dietpi-sync - run more often/continously?

Post by Joulinar »

in meantime I got dietpi-sync running from qbit external command but it will end up same user permissions as they are download by qbit

Code: Select all

-rw-rw-r-- 1 qbittorrent dietpi
question is if write permission for other would be enough to be able to access files on the NAS. Means to use 666 instead of 777

There is an old request on qbit github to add a feature to be able to change permission :)
https://github.com/qbittorrent/qBittorrent/issues/8016
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply