Backing up and restoring from XFS volumes

You’ve moved to XFS volumes and low-and-behold your super simple yet extremely important backup process stopped working. Dig a little and you learn that XFS volumes require their own tooling to do backups at the block level so the old “dump/restore” packages you relied on won’t work.

That is what happened to me.

I do monthly full backups of my personal systems and daily incrementals. On top of that, I do them from a central system and back the other systems up via SSH. It is not a big environment, so this is an easy to maintain system which does disk-to-disk backups complete with compression. It is optimized, quick, and very portable.

I had to tweak my backup tooling ever so slightly to make it use xfsdump with the right flags. It was a bit of a pain to do, but not terrible.

My backup line looks like:

/usr/bin/ssh host_to_backup "/sbin/xfsdump -l5 -  / | /usr/bin/ssh backup_server /usr/bin/dd of=/backup/month.0/daily.0/host_volume.dgz"

The script does a lot more than that. It will rotate through all of the volumes on the host to be backed up and name the file accordingly, switch between full and incremental backups based upon the date (first sunday of the month, for example), and it creates and maintains a defined (at runtime) number of “month” folders and daily folders. I try to keep it simple considering at the time of a restore you are usually under pressure. The last thing you want to do is scramble to search through a bunch of files and folders. So the naming convention makes it easy: month.0 is the current month, month.1 is last month, and so on, and daily.0 is today, daily.1 is yesterday, and so on. On top of that, the files have their date stamps, so if you are looking for a specific date (the 17th) it is quick to locate.

Now, to restore, I like interactive restores. I find the vast majority of the time, it’s a surgical restore: restore a file or folder.

xfsrestore -i -f /backup/month.0/daily.0/host_volume.dgz .

It is important to remember xfsdump and xfsrestore are sensitive with the ordering of the command line options. For example, xfsrestore did not like combining -i and -f into -if so do not make that assumption.

Why I Quit Twitter

Social Media started off with such noble aspirations: break down the borders, remove the boundaries and barriers, freedom to talk about anything, turn the tables and get people socializing more, turn those introverts into extroverts, have an open platform to share everything from gossip to news.

Fast forward and what have we learned? Anything unregulated devolves into complete anarchy. The social media giants have learned this the hard way and have been on the reactionary and defensive path ever since with disastrous results.

Remember, Social Media is exactly that: social.
It is not journalism.
It is more akin to “gossip” yet on a global scale.

It is as if your neighbor had some juicy news about someone cheating and told everyone on the street. Yet the street has 7 billion people on it. That gossip could be baseless or based upon something. Who knows? No one really. Even the person spreading the gossip might not even be who you think they are. There is a really good chance the person posting the juicy “news” is not even from your own country.

This opened the doors for conspiracy theorists to have a platform to be heard. Then the extremists. Followed by, of course, the trolls. And finally the purposeful manipulation of information by groups (governments, organizations, groups) with their individual and sometimes aligned agendas. Add that all together with a large population of users who cannot see the difference between the “gossip” of social media and the “news” and it is no surprise the world is becoming more divisive and fractured.

Twitter in particular attempted to begin to provide editorship over the content being posted. Rather than use the word “editorship”, since that would put them in the realm of a legitimate media organization subject to some stricter rules in the US, let us use the word “censorship.” Yes, Twitter will hide or delete content it deems as bad against criteria they have developed and manage subjectively.

Hate Speech.
A meaningless phrase that implies meaning.

That phrase is entirely subjective and baseless. If one were to say they do not like lead pencils, another could see it as a hate of lead pencils. It is a made up phrase that is entirely subjective to the individual, yet the phrase resonates with so many people and has become a weaponized phrase.

What is worse is that Social Media giants have recognized their influential power and appear to actively leveraging that power by “choosing a side”: leaning more heavily on stifling one group of individuals while leaning more heavily on propping up another group. Now they are not only editing and censoring, but they are actively crafting the culture of their platform. This activity breeds even more gossip about an agenda. Even more frightening is, whether collectively or coincidentally independently, the Social Media giants are taking similar actions as if they were coordinating with one another.

With the events in the US unfolding as protests turned to riots in May of 2020, the situation has gotten very dark. Twitter specifically has actively allowed their very own definition of “hate speech” to remain which call for violence against a specific group of people: white / Caucasian. Examples of which can be found here. These are disturbing on the gossip platform and extremists like this now have a platform to spout their hate from.

One might excuse it away as “We cannot monitor it all”, but when the platform is actively supporting violence and anarchy it cannot be overlooked.

Those who run Twitter have chosen a side for their community.

The final straw is their take down of a video from the US Federal Government of a speech by the President of the United States for “Healing not Hate”. It is probably the single most important message in these trying times, yet Twitter decides to allow for a DMCA take down notice to be executed.

Twitter would rather be complacent in their contribution to the death and misery of human beings than to be a part of the solution.

Windows 10 + Samba as a Domain Controller

If you are running a Samba server as a Domain Controller for your network and a new Windows 10 client workstation prevents you from logging in via the following error:

We can't sign you in with this credential because your domain isn't available.  Make sure your device is 
connected to your organization's network and try again.  If you previously signed in on this device with 
another credential, you can sign in with that credential.

The fix is rather simple and a result of using an older configuration file (likely from years of upgrading) without applying the much needed configuration enhancements that come with the later releases.  Add the following to your /etc/samba/smb.conf file and restart both smb and nmb processes:

server max protocol = NT1

Until the RedHat based distributions, including Fedora, are able to support the new Samba-DC implementation the NT4-style is still around for the near term.

The client workstation may need the following as well:

HKEY_LOCAL_MACHINE->System->CurrentControlSet->Services->LanmanWorkstation
DomainCompatibilityMode->DWORD:1
DNSNameResolutionRequired->DWORD:0

Source: http://www.coldandheartless.com/blog/2017/12/windows-10-in-my-samba-pdc/