Mattaton Posted January 9 Share Posted January 9 9 minutes ago, ich777 said: Can you describe a bit further what you are trying to achieve? You can pass over TZ as a variable to the container (which it should do by default), I tested this back with 6.10 I think and it was working fine with the correct timezone. Depends on where you put those files, they should all go into /luckybackup in the container and not in /root (if you are running luckyBackup as root). So, I can just add in a TZ var to the ENV setup and that will do it, or do I need to do the .profile avenue that @cybrnook described? Quote Link to comment
cybrnook Posted January 9 Share Posted January 9 1 minute ago, Mattaton said: So, I can just add in a TZ var to the ENV setup and that will do it, or do I need to do the .profile avenue that @cybrnook described? @Mattaton Try and and see if it works Log into docker console (you will be root), and execute: su - luckybackup touch .profile echo "export TZ=America/New_York" > .profile Then restart your container and check the "date" commands again. Then maybe test a simple scheulded backup and see if it kicks off when you want it to. 1 Quote Link to comment
Mattaton Posted January 9 Share Posted January 9 (edited) 5 minutes ago, cybrnook said: @Mattaton Try and and see if it works Log into docker console (you will be root), and execute: su - luckybackup touch .profile echo "export TZ=America/New_York" > .profile Then restart your container and check the "date" commands again. Then maybe test a simple scheulded backup and see if it kicks off when you want it to. I tried just adding a TZ var to the ENV settings. That did not work. Date command still returns in CET. Created the .profile as you described and it returned the time in EST, albeit in a different format and in 24-hour syntax (as yours did). root@d841cef0c6d7:/# date Tue 09 Jan 2024 03:28:03 PM EST root@d841cef0c6d7:/# su - luckybackup luckybackup@d841cef0c6d7:~$ date Tue Jan 9 15:28:12 EST 2024 Edited January 9 by Mattaton Quote Link to comment
cybrnook Posted January 9 Share Posted January 9 1 minute ago, Mattaton said: Created the .profile as you described and it returned the time in EST, albeit in a different format and in 24-hour syntax. root@d841cef0c6d7:/# date Tue 09 Jan 2024 03:28:03 PM EST root@d841cef0c6d7:/# su - luckybackup luckybackup@d841cef0c6d7:~$ date Tue Jan 9 15:28:12 EST 2024 Good! Can you setup a simple backup job to run, say in 5 min and see if it kicks off correctly? 1 Quote Link to comment
Mattaton Posted January 9 Share Posted January 9 10 minutes ago, cybrnook said: Good! Can you setup a simple backup job to run, say in 5 min and see if it kicks off correctly? Just ran a test and it seems to be working! Thanks for the help with this! And I would think anything in the luckybackup folder is persistent, correct? Quote Link to comment
cybrnook Posted January 9 Share Posted January 9 1 minute ago, Mattaton said: Just ran a test and it seems to be working! Thanks for the help with this! And I would think anything in the luckybackup folder is persistent, correct? Yes, I think so. That's where @ich777 has been pointing all users to go for persistent changes (like keys). This should be no different. 1 Quote Link to comment
ich777 Posted January 9 Share Posted January 9 2 minutes ago, cybrnook said: Yes, I think so. That's where @ich777 has been pointing all users to go for persistent changes (like keys). This should be no different. Have you yet tried to create a Variable in the Docker template itself with the Key: TZ and as Value: America/New_York This should basically do the same system wide. Quote Link to comment
cybrnook Posted January 9 Share Posted January 9 (edited) 25 minutes ago, ich777 said: Have you yet tried to create a Variable in the Docker template itself with the Key: TZ and as Value: America/New_York This should basically do the same system wide. That didn't work (just to calrify, the "root" user in the container is fine, it's the "luckybackup" user that is running as CET. That seems the be the main app user within the container, where cron is being used.): Edited January 9 by cybrnook Quote Link to comment
Mattaton Posted January 9 Share Posted January 9 5 minutes ago, cybrnook said: That didn't work: Same. Didn't work when I tried either. Quote Link to comment
ich777 Posted January 9 Share Posted January 9 29 minutes ago, cybrnook said: just to calrify, the "root" user in the container is fine, it's the "luckybackup" user that is running as CET. That seems the be the main app user within the container, where cron is being used This should not matter since it‘s a environment variable and it is available for all users, I‘ll look into that tomorrow, it‘s getting late over here. 1 Quote Link to comment
cybrnook Posted January 9 Share Posted January 9 19 minutes ago, ich777 said: This should not matter since it‘s a environment variable and it is available for all users, I‘ll look into that tomorrow, it‘s getting late over here. Schlaf gut 🙂 (Sleep well) Quote Link to comment
Mattaton Posted January 10 Share Posted January 10 Update on the timezone scheduling... I have the cron for my main profile (daily-5am) set to run at 5am, which it did NOT. I checked the timezone and it still checks out as EST. So, we'll see if it runs at 11am and the 6-hour delay issue remains. 0 5 * * * /usr/bin/luckybackup -c --no-questions --skip-critical /root/.luckyBackup/profiles/ daily-5am.profile > /root/.luckyBackup/logs/daily-5am-LastCronLog.log 2>&1 Before yesterday, I had this cron job set to 0 0 * * * and it would run at 6am (6 hours later). With the timezone fix, I would think this should have run at 5am when set to 0 5 * * *. You guys see anything I'm doing wrong? Quote Link to comment
cybrnook Posted January 10 Share Posted January 10 2 hours ago, Mattaton said: Update on the timezone scheduling... I have the cron for my main profile (daily-5am) set to run at 5am, which it did NOT. I checked the timezone and it still checks out as EST. So, we'll see if it runs at 11am and the 6-hour delay issue remains. 0 5 * * * /usr/bin/luckybackup -c --no-questions --skip-critical /root/.luckyBackup/profiles/ daily-5am.profile > /root/.luckyBackup/logs/daily-5am-LastCronLog.log 2>&1 Before yesterday, I had this cron job set to 0 0 * * * and it would run at 6am (6 hours later). With the timezone fix, I would think this should have run at 5am when set to 0 5 * * *. You guys see anything I'm doing wrong? @Mattaton let's continue in the support thread. Quote Link to comment
WarHawk8080 Posted January 28 Share Posted January 28 (edited) I have been using rsync to backup my audiobooks from my UnRaid box to a 2nd smaller TrueNAS Scale box...was thinking about this...saw the validate command on luckybackup to show Would something like this as a cron? rsync -aqu --protect-args -chown=warhawk:warhawk /mnt/user/appdata [email protected]:/mnt/optimus/NAS/WarHawk/MOBIUS.DOCKER.BACKUP The -a is "archive mode" which is the command "equivalent" to -rlptgoD The -q quiet (so it doesn't output anything)...just does it The -u updates (allows rsync to skip files that are still new in the destination directory) don't know what the --protect-args is...is that the same as -p or preserve permissions? The -chown just makes sure it has the same permissions on my target drive as the "user:group" I am backing up to (otherwise my user has a directory with a bunch of "nobody:users" files/directories in them. Of course I ran the first command like this the first time to watch all the awesome text go by to ensure it was actually going to the correct location. rsync -avhP /mnt/user/appdata [email protected]:/mnt/optimus/NAS/WarHawk/MOBIUS.DOCKER.BACKUP Since I followed the howto and installed the /root/.ssh/id_rsa it allows passwordless SSH login and instant upload/backup to my 2nd box Edited January 28 by WarHawk8080 Quote Link to comment
ich777 Posted January 28 Share Posted January 28 14 hours ago, WarHawk8080 said: Since I followed the howto and installed the /root/.ssh/id_rsa it allows passwordless SSH login and instant upload/backup to my 2nd box Please don't, please use /luckybackup/.ssh/id_rsa It should always point to /luckybackup and not to /root inside the container! 14 hours ago, WarHawk8080 said: --protect-args is...is that the same as -p or preserve permissions? No, that is not the same, --protect-args is used when you have special characters or I think even spaces in your paths and you don't want the shell to mess with that when passed over to rsync. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.