Bacula schedule full every 2 weeks on a Wednesday - bacula

I'm wanting to do a Bacula schedule where a full backup is required every 2nd week on a Wednesday with a 14 day retention.
Would this work, and/or is there a better way ? Seems way more complicated than it needs to be ...
Run=Level=Full 1st wed at 03:40
Run=Level=Incremental 1st sun-tue at 03:40
Run=Level=Incremental 1st thu-sat at 03:40
Run=Level=Incremental 2nd sun-sat at 03:40
Run=Level=Full 3rd wed at 03:40
Run=Level=Incremental 3rd sun-tue at 03:40
Run=Level=Incremental 3rd thu-sat at 03:40
Run=Level=Incremental 4th sun-sat at 03:40
Run=Level=Full 5th wed at 03:40
Run=Level=Incremental 5th sun-tue at 03:40
Run=Level=Incremental 5th thu-sat at 03:40

Related

how do you extract a variable that appears multiple times in a table only once

I'm trying to extract the name of space organisations from a table but the closest i can get is the amount of times it appears next to the name of the organisation but i just want the name of the organisation not the amount of times it is named in the table.
if you can help me please leave a comment on my google colab.
https://colab.research.google.com/drive/1m4zI4YGguQ5aWdDVyc7Bdpr-78KHdxhR?usp=sharing
What I get:
variable number
organisation
time of launch
0
SpaceX
Fri Aug 07, 2020 05:12 UTC
1
CASC
Thu Aug 06, 2020 04:01 UTC
2
SpaceX
Tue Aug 04, 2020 23:57 UTC
3
Roscosmos
Thu Jul 30, 2020 21:25 UTC
4
ULA
Thu Jul 30, 2020 11:50 UTC
...
...
...
4319
US Navy
Wed Feb 05, 1958 07:33 UTC
4320
AMBA
Sat Feb 01, 1958 03:48 UTC
4321
US Navy
Fri Dec 06, 1957 16:44 UTC
4322
RVSN USSR
Sun Nov 03, 1957 02:30 UTC
4323
RVSN USSR
Fri Oct 04, 1957 19:28 UTC
etc
etc
etc
What I want:
organisation
RVSN USSR
Arianespace
CASC
General Dynamics
NASA
VKS RF
US Air Force
ULA
Boeing
Martin Marietta
etc

Merge Time Series-Data with different time delta

I am trying to merge two dataframes with different time delta. One represents the returns of an asset (df2) on a daily basis and the other one is the inflation rate (df1) which is published once a month but not in a regular inverval. I am trying to merge those two.
df1 =
First Release
Original Release Date
30 Jun 2010 10:01 1.4%
30 Jul 2010 10:00 1.7%
31 Aug 2010 10:00 1.6%
30 Sep 2010 10:00 1.8%
29 Oct 2010 10:02 1.9%
... ...
17 Mar 2022 11:00 5.9%
21 Apr 2022 10:00 7.4%
18 May 2022 10:00 7.4%
17 Jun 2022 10:00 8.1%
19 Jul 2022 10:00 8.6%
[145 rows x 1 columns]
df2 =
Date
2010-08-11 -0.001654
2010-08-12 -0.028538
2010-08-13 0.001072
2010-08-16 -0.007665
2010-08-17 0.002667
...
2022-01-25 0.029663
2022-01-26 0.026082
2022-01-27 -0.000115
2022-01-28 0.002425
2022-01-31 0.007184
Obviously inflation rate should be placed in the new column from the day after it is released until there is a new release. For example 30. June is the first anouncement and 30 Jul the second. So from 1. July to the 30. July should be 1.4 %. The result is published on the 30. but to avoid look-ahead-bias it is more appropriate to have it . Does someone have an idea or maybe encountered some similar problem ?

Is there way to convert Friday, August 31, 2018 12:12 PM into this format 2018-08-31 12:12 PM in sql?

I am trying to find a difference between two dates both in different formats. Is there way to convert Friday, August 31, 2018 12:12 PM into this format 2018-08-31 12:12 PM in sql? and how can I then find the difference?
the results should be in hh:mm:ss format, using metabase to run queries.

Compare NSDates across timezones

I'd like to compare and filter NSDates to determine whether there are any for today regarding the users current timezone.
Let's say I've a user located in Los Angeles (UTC-8 hours) and the following dates:
TargetDate
UTC: 2 pm (14:00) - 12. Feb 2017
LocalTime: 10 pm (22:00) - 12. Feb 2017
Now
UTC: 10 pm (22:00) - 11. Feb 2017 // Change of date!
LocalTime: 6 pm (06:00) - 12. Feb 2017
Today
UTC: 00 am (00:00) - 11. Feb 2017 // Begin of today
Tomorrow
UTC: 00 am (00:00) - 12. Feb 2017
In the next step I'd like to compare the TargetDate, Today and Tomorrow to determine, if the TargetDate is between Today and Tomorrow. This is where the problem is. When I compare the dates I receive an answer that it is of course not between these dates.
+ (BOOL)date:(NSDate*)date isBetweenDate:(NSDate*)beginDate andDate:(NSDate*)endDate
{
if ([date compare:beginDate] == NSOrderedAscending)
return NO;
if ([date compare:endDate] == NSOrderedDescending)
return NO;
return YES;
}
What I can do, is to convert the UTC date, TargetDate, to the local timezone but I'm very confused whether this is the best solution. In this post it's mentioned that you shouldn't do this because it confuses the whole problem.
Does anyone has an idea, how to solve this problem?
The problem you are having is actually here:
Today
UTC: 00 am (00:00) - 11. Feb 2017 // Begin of today
Tomorrow
UTC: 00 am (00:00) - 12. Feb 2017
You're deciding that the "day" is the UTC day. Instead, you need to determine the day in the target time zone.
Today
LocalTime: 00 am (00:00) - 11. Feb 2017 // Begin of today
UTC: 08 am (08:00) - 11. Feb 2017 // Equivalent UTC
Tomorrow
LocalTime: 00 am (00:00) - 12. Feb 2017 // Begin of tomorrow
UTC: 08 am (08:00) - 12. Feb 2017 // Equivalent UTC
Do keep in mind a few other things:
Compare with half-open intervals: StartOfToday <= SomePointToday < StartOfTomorrow (inclusive start, exclusive end).
America/Los_Angeles is not always UTC-8. It switches to UTC-7 during daylight saving time.
Not every day starts at midnight. For example, America/Sao_Paulo on 2016-10-16 started at 01:00. The 00:00 hour was skipped for DST.
If you just care about some point on that day, rather than the entire day, compare at 12:00 noon, rather than at 00:00 midnight. It avoids the DST problem.

OSX: Obj-C: how to get user last login and logout time of the user?

I need to fetch the last login and logout time of the user using objective-c. Is it possible?
I am able to see the whole record manually by viewing the following file
/private/var/log/accountpolicy.log
Even if I read the file from code and parse it but there are chances that user does not have the permission to access the file and so the app.
P.S: Can not ask user for right elevation window as I am doing it in background proecess.
Check the last command.
https://www.freebsd.org/cgi/man.cgi?query=last&sektion=1
LAST(1) FreeBSD General Commands Manual LAST(1)
NAME
last -- indicate last logins of users and ttys
SYNOPSIS
last [-swy] [-d [[CC]YY][MMDD]hhmm[.SS]] [-f file] [-h host] [-n maxrec] [-t tty] [user ...]
ex:
$ last
gbuzogany ttys001 Fri Mar 18 11:21 - 11:27 (00:06)
gbuzogany ttys003 Fri Mar 18 10:24 - 11:18 (00:54)
gbuzogany ttys003 Fri Mar 18 10:07 - 10:07 (00:00)
gbuzogany ttys002 Fri Mar 18 10:03 - 11:18 (01:15)
gbuzogany ttys001 Fri Mar 18 10:01 - 10:30 (00:29)
gbuzogany ttys001 Fri Mar 18 09:31 - 09:33 (00:01)
gbuzogany ttys004 Thu Mar 17 15:34 - 15:52 (00:18)
...