I create backup but i can't restore

Hi, i create backup my site : Backup → Create BackUp
Destination : Home
Status: complete.

then I entered in:
Backup → Restore backup and I have an empty list, I can’t choose anything because there’s nothing there.
I have (see) archive on FTP
Look at movie : https://gyazo.com/e6895f7b95e5a0af26bde3122f61f1b9

The second thing. Does this backup not include the database? Should the database copy be made manually from phpmyadmin?

I didn’t move anything, I thought it would all set by default. Should I move?

Same issue here, also reported by someone else in another thread. This bug has existed for over a year.

09-18-2021 still be the big problem, we can backup but cant restore? Are yu joke?

I’ve run into the same issue! I’ve just begun to use CP and thought I’d check out the native backup functionality and performed a standard backup. When I go into the restore function, the backup doesn’t appear on the drop-down list! I’ve confirmed via the file manager that the backup file is present and in its proper place. How do I fix this?

If you go here 1 - Backup/Restore - CyberPanel

It says on how to actually restore it.

The most important thing is

Place your backup files under /home/backup/

You will have to use terminal and move your backups files to /home/backup

1 Like

Must I use terminal? I’m much more familiar with FTP but I’m not sure that the website-specific FTP configuration provided through CyberPanel gets me to where I need to be in the folder hierarchy.

If it has to be terminal, I can use Putty. Please direct me to a resource where I can learn the commands required to navigate to where the backups have been placed and then copy or move them to the specific folder that they’re required to be in. Everything I’ve ever done in Putty up to this point has been based on detailed instructions.

Thanks for the help with this!

Hi ibowden,

Using the terminal for this task is quite easy to learn. To summarize what Usman said, the generated backup files are placed in /home/yourdomain/backup/ but need to be moved to /home/backup/ in order for Cyberpanel to recognize them.

Once in the terminal, gain root privileges sudo su and navigate to the home directory cd /home/
From there you can check to see if the backup folder exists by typing ls if you see backup then skip this next step. To create the backup folder type mkdir backup. Now that your backup folder is created you will need to move the backup file.

Navigate to the sites backup location by typing cd /home/yourdomain/backup/. From there you should be able to type ls again to view the backup file. It will start with backup and end with .tar.gz

To move the file type mv backup-yourdomain.tar.gz /home/backup/.

That should complete the process. In the future you will not need to create the /home/backup/ but rather just follow the same directions to move any other backups.

1 Like

@be9hop your explicit instructions are exactly what I needed and most appreciated! Thank you so much for graciously jumping in and helping me with this process that’s frustrated me for the past few days. I’ve successfully been able to find and move two backup files that I experimentally created a few days ago and the restore function finds these files as it should. However…
When actually executing the restore function, I get the error message " This website already exists… Not able to create Account, Databases and DNS Records, aborting. [575][5009]" My logical response to this is, ‘Yes, I know it already exists. Nevertheless, I want the backup to supplant what’s already there.’
This leads me to believe that, prior to performing a backup restoration, I first need to obliterate (delete) the current website. Please confirm that this is the case as it makes no mention of this requirement in the CyberPanel documentation. It would also seem quite unorthodox compared to other backup/restore functions in other software programs.
Also, please solve the big mystery - at least to me - that is at the root of all of this: Why on earth would the designers of this software require files to be moved around like this using terminal in order to facilitate a backup restoration?! Wouldn’t it make more sense to just initially place backup files in a folder that’s more easily accessible to CyberPanel’s restore function?! This whole required process seems very nonsensical to me - but maybe there’s a good reason that you can shed some light on!

Hi @ibowden glad to help. I am actually getting the same error as you when attempting to restore a site. I’d assume we don’t need to delete the site first as the docs mention that you must create a site before restoring. Maybe @usmannasir or @die2mrw007 could shed some light on this issue. If it is indeed a bug, one of use could open a bug report. I just wanted to confirm this isn’t normal before potentially wasting their time.

As for your other question, I have no idea why the backup files are stored in a different directory. I’m sure there has to be a reason but I can’t think of one. Seems like the more logical way of doing it would be saving all backups in home/backup/ in separate folders. Then in the Cyberpanel gui, select a site during restore then select the exact backup file. But then again maybe I’m wrong?!?!

1 Like

Let me answer why the backup files are created in a folder which is not accessible to cyberpanel for restore operation.

Reason: cyberpanel is a complete self hosted hosting panel which means you will have reseller users, end users too apart from admin users and having the backup files accessible will be accessible for all user levels making things worse.
This behavior is intentional.

Also let me quote what usman mentioned about this:

Normal users cant restore backups because they cant create sites, so backups are kept in user own home directory, if you want to restore need to manually move file there.

Understood, thanks for the clarification.

Do you happen to know why we are both experiencing the below error when attempting to restore a site?

This website already exists… Not able to create Account, Databases and DNS Records, aborting. [575][5009]

My install is only 2 days old so I shouldn’t have anything out of the ordinary. I’m on 2.1 build 2.

Usually its best practice to delete website and database and then use the backup restore operation according to me. Although documentation mentions it otherwise, but I have been experiencing this since 2.1.1 version of cyberpanel. Things may have changed since the documentation was created back then. I have been using cyberpanel since around March 2021 I guess and since then its this way itself (have to delete websites and files before restore operation to get it successfully restored).

I haven’t complained about this behavior as a bug or something because I personally believe its the best method. Reason: restore operation on existing files, dns will overwrite exisiting same files but extra files and dns entries will still be there making it a mess. A clean restore should be 100% the old backup files restoration.

1 Like

Got it. I’ll give that a shot.

1 Like

I obliterated the website I’d backed up (websites > delete website) and then ran the restore function and it quickly and accurately installed a replica of the site I’d previously backed up. So, although it’s not all that intuitive - and certainly not stated in the docs - one must entirely delete a website from the CyberPanel control panel before it will be able to be restored. And fortunately SSL was still on the restored website!

While I now understand much of the rationale behind requiring backups that one wants to restore be in a directory that is only accessible via terminal, it’s unfortunate that restoring a website will require so many steps to accomplish. One of the most typical reasons for making a user-initiated backup (in my typical workflow) is because I’m about to do some work on the website that might break it and I want a quick and easy way to bring it back to life if I make a mistake. If I do break it, I’ve got quite a number of steps to go through before my site becomes live again! Fortunately, with the help provided by @be9hop, I now have a good set of instructions to work from.

Thanks to all who helped me through this.

1 Like