UPDATE: This process is also valid for the current version 7.0.1-42218

If you are not familiar with Synology and their DSM OS it would be good to know that when it comes to updates, there is only one official way, forward. Meaning you can't downgrade DSM back to previous versions.

Now, this is not entirely true as there was an unofficial way to downgrade that is still valid but I can't stress enough how much this is NOT officially supported, and that you should do this only if absolutely necessary.

DISCLAIMER: the method you will follow below is unofficial not supported by Synology in any way. Any problems that you might have or negative outcomes are your responsibility and your alone. The author of this article will take no part in being accountable for these actions.
WARNING: Before moving forward be sure to use your NAS DSM installation when needed and not the one in example! If you end up using the wrong one and do not get blocked by the device itself, you will end up not being able to boot up your NAS! Download the correct version from Synology Download Center page.

General idea

The main goal here is to get your NAS into a state that will allow you to install the version of DSM6 that you had installed before going to DSM7 (beta or not).

DSM 6 version in question here will be 6.2.4-2556.

To make this happen the general principle was always the same. Get into your NAS via telnet command on port 23 to fake its VERSION file. For this to happen your NAS should be in the migratable state so that you can plant a "fake" PAT file (DSM OS install file) that will initiate an error during the installation. As a result, port 23 will be open, and the action begins.

Let's see how to make this all happen.

IMPORTANT: Be aware that with this process you will lose all data and settings on your NAS but you will downgrade to DSM6. So before you decide to move forward, be sure to backup your data and export your DSM configuration! You have been warned!

STEP01 - Backup!

Do NOT skip this step!

Be sure to backup all important data on your currently working DSM7 setup. This includes data, Docker configuration, DSM configuration, app settings, etc.

Best to use Hyper Backup for your data, and Configuration backup DSM option for everything else.

Be sure to backup your DSM settings (users, shared folders settings, permissions and more)

STEP02 - SSH and connect as root

Activate SSH access if it's not already by using Control Panel > Terminal & SNMP section. Check the SSH box and hit Apply.

Activate SSH

Now that you have SSH access it is time to access your NAS as root. Open up PUTTY or a similar tool and SSH into your NAS like so:

ssh yourDSMaccount@NASIPAddress

Enter your account password and you should be logged into your NAS as your DSM account. Now it's time to elevate to root privileges to make the changes that we need.

Type sudo -i and then your account password once more. Now you should be logged as root indicated by a similar command prompt

root@DSM6_7:~# (name after @ will be the name of your NAS)

Using the VI editor in the command line

Before moving forward, for all you out there that are not familiar with the vi editor, here are a few examples of the commands that you will be using and what they do:

i - insert/edit mode
ESC - exit insert/edit mode
:wq - save changes and quit
:q! - quit without saving changes

STEP03 - modifying VERSION file (take 1)

Enter the following command to edit the VERSION file:

vi /etc.defaults/VERSION

You will get the following output:

majorversion="7"
minorversion="0"
major="7"
minor="0"
micro="0"
productversion="7.0"
buildphase="Beta"
buildnumber="41222"
smallfixnumber="0"
nano="0"
base="41222"
builddate="2020/12/04"
buildtime="21:03:19"

Change this current block with the following one (notice that we are going all the way to DSM 6.2.2 version) by pressing the i letter on your keyboard to enter INSERT mode.

majorversion="6"
minorversion="2"
productversion="6.2.2"
buildphase="GM"
buildnumber="24922"
smallfixnumber="4"
builddate="2020/12/04"
buildtime="21:03:19"

In order to save use this process:

Press the ESC key and then type in :wq and hit the RETURN key on your keyboard. This will save the changes and quit the editor.

Just a quick note why are we going this. If you want to downgrade to version 6.2.4 like we are in this example, then you have to edit the VERSION file to be version below the version you are going back to. This is the reason why we are using DSM 6.2.2. settings so that when we are ready to get back to DSM 6.2.4, the installer will detect that we are below that target version and allow us to update.
I know it is confusing that I am mentioning "update" when we are downgrading, but that's the whole idea. Fake that we are on a version below our target DSM 6 version so that we can "update" back to it.

Now that you have made the changes, shut down your NAS and boot it up again.

NOTE: At the moment, your NAS will drop off its current static IP address (switch to DHCP) and you will have to use the Synology Assistant app to locate it

STEP03 - Synology Assistant and fake PAT

Download the Synology Assistant app from Synology Support site (for any NAS model they are all the same) for your desktop PC OS.

Run the Assistant and let it detect the NAS on the network:

As you will notice, the version is still DSM 7 (41222 beta in this case) but the status of the NAS has changed to Migratable, this is what we want. Connect to the IP address that it is registering.

You will land on the DSM7 wizard (Welcome Back!) page similar to this one:

Click the Install button to move forward. You will have two options now:

Considering that you have done step01 (you did right?!) I will select the second option, Reset system configuration. This will wipe my DSM settings that I will later restore using the exported configuration.

NOTE: You can use the first option as well and that will retain your settings, data, all of it. Still, I would suggest having a backup before you move forward! In case you have decided to use the option to retain your settings you might get the following "attention" from System health
Still, the NAS will work just fine, and your settings and data will be preserved. If this will bother you, then I suggest you use the second option and restore your data and settings after coming back to DSM6.

Now comes the fun part. The next step will ask for the DSM OS PAT installation file. Considering that you are still on DSM7, you will not be able to just give the wizard a DSM6 file and hope for the best, no, you will have to give it a fake DSM7 file.

Create a fake DSM7 PAT file

The PAT file that you have used to install DSM7 in the first place will not be used in this case, but rather any file (it can be a text file) that you will just name as a DSM7 installation file.

So make a file or use any file (txt, MP3) and give it a name DSM_VirtualDSM_41222.pat

Now use that file in the next wizard step:

Browse to that fake file and click the Next button to apply it.

If you got the following error, you are on the right track. Simply click OK to get back to the previous screen.

NOTE: At this point, you might think that not much has happened but even though it is not visibly written, DSM has opened Telnet access on port 23. This is our way in for the final stage.

STEP04 - Telnet into your NAS and edit the VERSION file (take 2)

Now open up a telnet client of your choice (like Windows CMD line for example or any other that you might have) and log into your NAS as root.

To access your NAS via telnet now use this:

telnet NASIPaddress 23

For credentials, use root for username and 101-0101 for the password. If you have typed all correctly, you should be in the command line.

Now we will just edit the VERSION file one more time with a different set of settings than in step 02.

Use vi /etc.defaults/VERSION command one more time to get into the VERSION file.

You will notice that the file has been restored to the initial DSM7 values. Now replace the following block:

majorversion="7"
minorversion="0"
major="7"
minor="0"
micro="0"
productversion="7.0"
buildphase="Beta"
buildnumber="41222"
smallfixnumber="0"
nano="0"
base="41222"
builddate="2020/12/04"
buildtime="21:03:19"

with this one:

majorversion="6"
minorversion="2"
productversion="6.2.2"
buildphase="GM"
buildnumber="24922"
smallfixnumber="4"
packing="official"
packing_id="18"
builddate="2019/10/30"
buildtime="07:07:54"

As you can see there are some more parameters in this one. Save the VERSION file and exit the editor as before using the ESC + :wq combination.

At this moment use the Synology Assistant again to "scan" for changes. Your NAS should be now listed as running with DSM 6.2.2 version:

Finally, one more thing remains.

STEP05 - Install DSM6 version

Now that our NAS "thinks" that it is running DSM 6.2.2.xxxx, we can update ti to any version above that version to the last major version of DSM6, in this case, that will be DSM 6.2.4.

Download the 6.2.4 version from the Synology support site for your NAS, and get back into the installation wizard page from step 04 where we got an error.

Point to the DSM 6.2.4 version and hit Next.

The installation should continue and after some time, you will be back in DSM6.

Wait for the installation to complete and your NAS to reboot. Once that is done, log into your NAS, create your account, and restore all the settings and data.

Once again I would like to point out that DSM will have that "attention" status that DSM cannot start up normally if you haven't decided to use the "fresh" install method!

Conclusion

As I said already, this is the same general principle that hasn't changed since DSM4. As long as you get into your NAS via port 23 and edit the VERSION file correctly, you should be fine.

Still, one more time, this is an unsupported (by Synology) method of downgrading your NAS. Use this only, and only if you have no other option for whatever reason.

Good luck and you are welcome to comment on the topic if you have any suggestions, questions, or comments.