Very unusual issue/bug when using `virtualmin backup-domain` (Fixed: was typo)

Source:

SYSTEM INFORMATION
OS type and version Rocky Linux 8.10
Usermin version 2.102
Virtualmin version 7.30.3

Target:

SYSTEM INFORMATION
OS type and version Rocky Linux 9.5
Usermin version 2.102
Virtualmin version 7.30.4

On moving two sites to a new server with this:

OLD SERVER:

	Backup account: 
  	virtualmin backup-domain --domain domain.tld --dest /home/backupsformove/domain.tld.tar.gz --all-features
		
	Then transfer to new server:
  	scp /home/backups-for-restore/domain.tld.tar.gz root@12.93.133.18:/home/backups-for-restore/
    
NEW SERVER:

	Restore account:
    virtualmin restore-domain --source /home/backups-for-restore/domain.tld.tar.gz --all-features --domain domain.tld

I have found that the backup is either incomplete or old.

On the first site/account I did this I noticed that the Postgres database had records missing! So I had to do a manual DB dump and restore as per this thread. I did not check other contents/files as I uploaded fresh copies from my local machine.

On the second account, it appears that the whole backup (including database - as it has some blog posts missing) is old - this is very bizarre! On this second account the site is a Wordpress site, which I originally had trouble transferring because it was using an old version of Wordpress however I manually upgraded the Wordpress site on the old server and it was working fine. So I deleted the virtualmin account I had created via restore on the new server and then carried out the back-up, transfer and restore again as per the instructions above. But oddly, I was getting the exact same error (that certain syntax is deprecated) on the new server… even though I had upgraded the site on the old server successfully so this error should now have been occurring! Anyway so I manually upgrade Wordpress again on the new server… and then the site starts working, however this is when I noticed a number of the recent blog posts are missing.

This leads me to conclude there is some sort of issue/bug with the backups being carried out with this command:

virtualmin backup-domain --domain domain.tld --dest /home/backupsformove/domain.tld.tar.gz --all-features

This is very concerning if this is the same command/process Virtualmin uses when it carries out scheduled backups (via Virtualmin > Backup & Restore). (Can anyone confirm if it is? If it is for now I may start scheduling manual backups of the databases just to be on the safe side).

Looks bugish. I don’t use CLI but when you look at GUI do you see Postgres (instead or Mariadb unlike here)

1 Like

Omg I think I noticed a huge bug in my process! Give me one sec to test it out…

I’m so sorry it was an error on my part!! I had the wrong directory here:

scp /home/backups-for-restore/domain.tld.tar.gz root@12.93.133.18:/home/backups-for-restore/

So basically it was copying OLD backups (i.e the backups I had used to move the sites on the old server from an even older server!!!)

This thread should be deleted as it will not help anyone and might needlessly worry people - the Virtualmin backups are fine!

2 Likes

Leave it up, even mistakes help. But mark solved.

1 Like

I like to date my backups using strftime substitution to get a timestamp on the backup files or directory. It’s harder to miss mistakes like this (the kind of mistake we have probably all made).

1 Like

I do for scheduled backups but think that’s a good idea even for when moving servers - just to be on the safe side :sweat_smile:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.