no, no, no
Sure that we need to think about, but I think that we will require manual steps of the sysadmin…for the new installation, it is not a problem
I’m doing a little script to restore all data
no, no, no
Sure that we need to think about, but I think that we will require manual steps of the sysadmin…for the new installation, it is not a problem
I’m doing a little script to restore all data
Will that install the patch I’m trying to avoid ?
(Means test on different system for me)
nope, only backup, I for the moment let down it
of course I prefer test VM first
Now I will just create a snapshot, install and test, revert if needed. Else I would have to use a clean vm
So, I’m about to update now. I had some pending updates, so doing it in two passes. First is get everything in standard repo up-to-date, then apply the patch. Will need to test a bit between the two and report back in a bit.
This works wonderful! So well, that it just about scrapes the AD account for any relevant info and backs it up. I wonder how usefull this is in my scenario, as SOGo has read only access to those properties, and would likely fail when I restore. (Or so I should hope)
It does backup calendar and personal contactlist data, and I would suspect this can be restored as well. Gonna test that now. But the backup works flawless, thanks!
Edit: output for my scenario:
[root@mymailserver sogo-2017-12-08_2026]# cat username
{
"ldif_record" = "dn: cn=jeroen visser,cn=users,dc=mydomain,dc=com
sn: Visser
instancetype: 4
pwdlastset: 131563537435499680
samaccounttype: 805306368
countrycode: 0
accountexpires: 0
logoncount: 8427
c_emails: username@mydomain.com
loginshell: /bin/bash
wwwhomepage: https://www.mydomain.com
lastlogontimestamp: 131571337180378420
name: Jeroen Visser
unixhomedirectory: /var/lib/nethserver/home/username
objectcategory: CN=Person,CN=Schema,CN=Configuration,DC=mydomain,DC=com
lastlogoff: 0
primarygroupid: 513
c_name: username
codepage: 0
givenname: Jeroen
profilepath: \\\\myfileserver\\profiles\\username
usnchanged: 4165
c_uid: username
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: user
mail: alias@mydomain.com
homedirectory: \\\\myfileserver\\username
c_cn: Jeroen Visser
whencreated: 20171128144220.0Z
badpasswordtime: 0
cn: Jeroen Visser
displayname: Jeroen Visser
userprincipalname: username@mydomain.com
usncreated: 3843
badpwdcount: 0
whenchanged: 20171207152158.0Z
distinguishedname: CN=Jeroen Visser,CN=Users,DC=mydomain,DC=com
homedrive: U:
samaccountname: username
useraccountcontrol: 66048
lastlogon: 131572347554605360
memberof: CN=Domain Admins,CN=Users,DC=mydomain,DC=com
memberof: CN=support,CN=Users,DC=mydomain,DC=com
";
preferences = (
{
AuxiliaryMailAccounts = (
);
LocaleCode = nl;
SOGoAlternateAvatar = none;
SOGoAnimationMode = normal;
SOGoAppointmentSendEMailNotifications = <*I1>;
SOGoCalendarCategories = (
Customer,
Calls,
Favorites,
Meeting,
Ideas,
Miscellaneous,
Birthday,
Anniversary,
Vacation,
Travel,
Projects,
Suppliers,
Gifts,
Clients,
Issues,
Business,
Holidays,
Personal,
Status,
Competition,
"Follow up",
"Public Holiday"
);
SOGoCalendarCategoriesColors = {
Anniversary = "#CCCCCC";
Birthday = "#CCCCCC";
Business = "#CCCCCC";
Calls = "#FFCC33";
Clients = "#CCCCCC";
Competition = "#CCCCCC";
Customer = "#CCCCCC";
Favorites = "#CCCCCC";
"Follow up" = "#CCCCCC";
Gifts = "#CCCCCC";
Holidays = "#CCCCCC";
Ideas = "#CCCCCC";
Issues = "#CCCCCC";
Meeting = "#CCCCCC";
Miscellaneous = "#CCCCCC";
Personal = "#CCCCCC";
Projects = "#CCCCCC";
"Public Holiday" = "#CCCCCC";
Status = "#CCCCCC";
Suppliers = "#CCCCCC";
Travel = "#CCCCCC";
Vacation = "#CCCCCC";
};
SOGoCalendarDefaultReminder = NONE;
SOGoCalendarEventsDefaultClassification = PUBLIC;
SOGoCalendarTasksDefaultClassification = PUBLIC;
SOGoCalendarWeekdays = (
SU,
MO,
TU,
WE,
TH,
FR,
SA
);
SOGoContactsCategories = (
" Business Partner",
" Competitor",
" Customer",
" Family",
" Friend",
" Press",
" Provider",
" VIP",
Colleague
);
SOGoDayEndTime = "18:00";
SOGoDayStartTime = "08:00";
SOGoDefaultCalendar = selected;
SOGoFirstDayOfWeek = <*I0>;
SOGoFirstWeekOfYear = January1;
SOGoGravatarEnabled = <*I0>;
SOGoLanguage = English;
SOGoLoginModule = Mail;
SOGoLongDateFormat = "%A, %B %d, %Y";
SOGoMailAddOutgoingAddresses = <*I0>;
SOGoMailAutoSave = <*I5>;
SOGoMailComposeFontSize = <*I0>;
SOGoMailComposeMessageType = html;
SOGoMailCustomEmail = "alias@mydomain.com";
SOGoMailDisplayRemoteInlineImages = never;
SOGoMailLabelsColors = {
"$label1" = (
Important,
"#FF0000"
);
"$label2" = (
Work,
"#FF9900"
);
"$label3" = (
Personal,
"#009900"
);
"$label4" = (
"To Do",
"#3333FF"
);
"$label5" = (
Later,
"#993399"
);
};
SOGoMailMessageForwarding = inline;
SOGoMailReceiptAllow = 1;
SOGoMailReceiptAnyAction = ignore;
SOGoMailReceiptNonRecipientAction = ignore;
SOGoMailReceiptOutsideDomainAction = ignore;
SOGoMailReplyPlacement = below;
SOGoMailReplyTo = "alias@mydomain.com";
SOGoMailSignature = "";
SOGoMailSignaturePlacement = below;
SOGoRefreshViewCheck = manually;
SOGoRememberLastModule = <*I0>;
SOGoSelectedAddressBook = personal;
SOGoShortDateFormat = "%d-%b-%y";
SOGoTimeFormat = "%H:%M";
SOGoTimeZone = "Europe/Amsterdam";
Vacation = {
autoReplyEmailAddresses = (
"username@mydomain.com"
);
daysBetweenResponse = <*I7>;
endDate = <*I0>;
startDate = <*I0>;
};
locale = {
days = (
Zondag,
Maandag,
Dinsdag,
Woensdag,
Donderdag,
Vrijdag,
Zaterdag
);
months = (
Januari,
Februari,
Maart,
April,
Mei,
Juni,
Juli,
Augustus,
September,
Oktober,
November,
December
);
shortDays = (
Zo,
Ma,
Di,
Wo,
Do,
Vr,
Za
);
shortMonths = (
Jan,
Feb,
Maa,
Apr,
Mei,
Jun,
Jul,
Aug,
Sep,
Okt,
Nov,
Dec
);
};
},
{
Calendar = {
EventsFilterState = "view_next7";
EventsSortingState = (
start,
1
);
FoldersOrder = (
personal
);
InactiveFolders = (
);
PreventInvitationsWhitelist = {
};
SelectedList = eventsListView;
View = weekview;
};
Contact = {
SortingState = (
"c_cn",
1
);
};
Mail = {
ExpandedFolders = (
"/0",
"/0/folderINBOX",
"/0/folderPublic",
"/0/folderShared",
"/0/folderShared/folderlmst01_A_mydomain_D_com"
);
};
}
);
tables = {
"/Users/username/Calendar/personal" = {
acl = {
};
displayname = "Personal Calendar";
records = (
{
"c_content" = "BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20171122T085254Z
LAST-MODIFIED:20171205T085238Z
DTSTAMP:20171205T085238Z
UID:040000008200E00074C5B7101A82E0080000000080409880E962D301000000000000000
010000000B7787AC01BFB044B88DC520D35B1BF67
SUMMARY:Ik heb iets te doen
X-MOZ-LASTACK:20171205T085238Z
DTSTART;VALUE=DATE:20171122
DTEND;VALUE=DATE:20171123
CLASS:PUBLIC
TRANSP:TRANSPARENT
DESCRIPTION:wheeeelp
X-MOZ-GENERATION:6
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT18H
DESCRIPTION:Standaard Mozilla-beschrijving
END:VALARM
END:VEVENT
END:VCALENDAR";
"c_name" = "040000008200E00074C5B7101A82E0080000000080409880E962D301000000000000000010000000B7787AC01BFB044B88DC520D35B1BF67.ics";
},
{
"c_content" = "BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20171121T160238Z
LAST-MODIFIED:20171121T160309Z
DTSTAMP:20171121T160309Z
UID:24d05d1f-dee1-41e0-aeb8-b1ca74a4eac4
SUMMARY:Afspraak of zooooo
DTSTART;TZID=Europe/Berlin:20171121T090000
DTEND;TZID=Europe/Berlin:20171122T090000
TRANSP:OPAQUE
CLASS:PUBLIC
X-MOZ-GENERATION:2
END:VEVENT
END:VCALENDAR";
"c_name" = "24d05d1f-dee1-41e0-aeb8-b1ca74a4eac4.ics";
},
{
"c_content" = "BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20171121T160207Z
LAST-MODIFIED:20171121T160323Z
DTSTAMP:20171121T160323Z
UID:60e9c3e8-1704-4eb1-ba01-9e651fd7a590
SUMMARY:Nieuwe gebeurtenis
DTSTART;TZID=Europe/Berlin:20171122T084500
DTEND;TZID=Europe/Berlin:20171122T094500
TRANSP:OPAQUE
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR";
"c_name" = "60e9c3e8-1704-4eb1-ba01-9e651fd7a590.ics";
},
{
"c_content" = "BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Amsterdam
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
LAST-MODIFIED:20171121T160149Z
DTSTAMP:20171121T160149Z
UID:6258a444-b96c-4d82-8001-9b53839cbf49
SUMMARY:Testt
X-MOZ-LASTACK:20171121T160149Z
DTSTART;TZID=Europe/Amsterdam:20171121T010000
DTEND;TZID=Europe/Amsterdam:20171121T020000
TRANSP:OPAQUE
CLASS:PUBLIC
X-MOZ-GENERATION:1
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT15M
DESCRIPTION:Standaard Mozilla-beschrijving
END:VALARM
END:VEVENT
END:VCALENDAR";
"c_name" = "6258a444-b96c-4d82-8001-9b53839cbf49.ics";
},
{
"c_content" = "BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20171121T160240Z
LAST-MODIFIED:20171121T160240Z
DTSTAMP:20171121T160240Z
UID:b036a3fa-fa6a-4895-bc94-62de68634fb1
SUMMARY:Nieuwe gebeurtenis
DTSTART;TZID=Europe/Berlin:20171122T111500
DTEND;TZID=Europe/Berlin:20171122T111500
TRANSP:OPAQUE
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR";
"c_name" = "b036a3fa-fa6a-4895-bc94-62de68634fb1.ics";
}
);
};
"/Users/username/Contacts/personal" = {
acl = {
};
displayname = "Personal Address Book";
records = (
{
"c_content" = "BEGIN:VCARD
UID:401A-5A2AE680-1-5187A600.vcf
VERSION:3.0
CLASS:PUBLIC
PROFILE:VCARD
N:Contact;Test
NICKNAME:TC
FN:Test Contact
EMAIL;TYPE=home:somemail@example.com
END:VCARD";
"c_name" = "401A-5A2AE680-1-5187A600.vcf";
}
);
};
};
}[root@mymailserver sogo-2017-12-08_2026]#
to restore I have done a crap script
sogo-restore-tool /var/lib/sogo/backups/sogo-DateOfBackup Username|-A for all
#!/usr/bin/bash
#
# script to restore the sogo backup
# stephane de labrusse <stephdl@de-labrusse.fr>
#
MYBACKUPDIR=$1
USERS=$2
if [ -z "${USERS}" ]; then
exec >&2
echo "Restore all calendars, addressbooks and configuration in sogo"
echo ""
echo "Usage: "
echo " " $(basename $0) "/var/lib/sogo/backups/sogo-DateOfBackup Username|-A for all"
echo ""
exit 1
fi
cd $MYBACKUPDIR
if [ $USERS = '-A' ];then
for i in `ls`
do
echo "#"
echo "#restoration of $i"
echo "#"
sogo-tool restore -p $MYBACKUPDIR $i
sogo-tool restore -f ALL $MYBACKUPDIR $i
done
else
echo "#"
echo "#restoration of $USERS"
echo "#"
sogo-tool restore -p $MYBACKUPDIR $USERS
sogo-tool restore -f ALL $MYBACKUPDIR $USERS
fi
The script works , it restored a deleted contact but sogo-tool doesn’t delete a contact that is not in the backup file.
[root@testserver ~]# ./sogo-restore-tool /var/lib/sogo/backups/sogo-2017-12-08_2132/ -A
#
#restoration of admin
#
<0x0xb0de60[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
<0x0xb0de60[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
<0x0x1830610[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
<0x0x1830610[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
#
#restoration of markus
#
<0x0x1444e60[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
<0x0x1444e60[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
<0x0x23c6610[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
<0x0x23c6610[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
yep it is the normal behaviour, I wonder if sogo-tool cannot help us wit my ldap problem.
FYI I’m working on the networking page, I would be really pleased if you can put your use cases that we shared together
What are you thinking about? How may sogo-tool help? Correct the DB?
The ldap/ldaps local/remote use cases from the previous posts? Yeah, I am ready to test.
nope I’m writing a page in the wiki on the nethserver nethworking
Not sure which one you want … I have been presenting numerous, ad nauseam I might add
That moment when you catch someone adding a ‘h’ after every occurrence of ‘net’
just a draft right now
Sorry it took me so long BSD was giving me issues today with mysql. Testing now.
Great! I installed and it works. Backup feature is great, I will restore now. Running NS 7.4 fully updated. I don’t know if this will restore mail filters? I will test and see!
Edit 45: It does restore sieve! I guess I could have read the backup file and figured it out
for what I saw, acl, sieve, configuration, ics and ldif are part of the backup
Just tested with real cases, my addressbook and agenda, about 20K lines each file…after the removal of sogo database in mariadb, do ‘signal-event nethserver-sogo-update’ and launch
sogo-restore-user /var/lib/sogo/backups/sogo-2017-12-10_0030/ stephane
all is there as expected, settings, contact, calendars