I am quite new to server migrations, but fairly familiar with cPanel though. My current task is to migrate an entire website from a server with cPanel to another one.
What I did so far:
Use the Backup Wizard on the old server to create a full backup archive, and FTP it to the new server.
The full archive (about 6 GB because there are a lot of images) is now in my new server's public_html directory.
Now, what I need is a way to make the server take this tar archive, which is a full backup, and restore from it.
What I tried:
I tried simply extracting the archive, but it is taking forever to finish (again the archive is 6 GB), and for some reason my browser tab has to stay open until the end of the process, otherwise the extracting halts.
Also, as I have WHM access, I tried the "Restore a Full Backup/cpmove File" option, but for some reason, under the "Username for the account that you wish to restore:" textbox, WHM does not find my cPanel username.
If anyone can either tell me what I am doing wrong, or propose another option, I would really appreciate it.
P.S.: I only have WHM access to the new server, not the old one.
Edit: I got the WHM method working now. My mistake was that my tar archive was not stored in the /home directory, but in the home directory of the cPanel user (which is /home/username)!
Move your cpanel full backup file to /home directory and if you root have access of the server use below command as /scripts/restorepkg (cpanel username )
OR
Login to WHM with root user and go through the steps mentioned on below URL.
http://documentation.cpanel.net:8090/display/68Docs/Restore+a+Full+Backup+cpmove+File
Related
I use a server with WHM. I created monthly backup, it makes full server backup to /backup folder. I can create targz file with SSH, I know how to download gziped file with pscp, but I don't know how to download it from server with link in browser. I think it's possible, because sysadmin before me did it.
Can anybody help me with that?
You want to generate a link that you can access through your browser and will be served up by the web server? (your question is a little vague)
These files are stored out of the standard web directories so you could create a symlink in the public_html folder of your website to /backups and call it something obscure so it can't be easily scraped.
So for example public_html/my-secure-backup-folder can be a symlink to /backups.
Guide on creating a symlink here: https://www.namecheap.com/support/knowledgebase/article.aspx/9561/29/how-to-create-a-symbolic-link-in-cpanel
Easiest way to proceed:
Ssh to your WHM server then decide which cpanel account you need to backup. Create a full backup for that cpanel:
cd /home/cpaneluser/public_html
/script/pkgacct cpaneluser /home/cpaneluser/public_html
chown cpaneluser:cpaneluser /home/cpaneluser/public_html/cpmove-cpaneluser.tar.gz*
Then you can download the backup using your web browser by accessing your cPanel user's domain -> http://domain.tld/cpmove-cpaneluser.tar.gz
If you don't know the actual domain for that cPanel user you can do a cat /etc/userdomains | grep cpaneluser. It will show the configure domain for that account.
That would be all.
Alternatively you can login to the cPanel account using your web browser -> http://domain.tld/cpanel using the user/password combination for that cPanel account. There is a full backup function there (in the cPanel web interface) that does pretty much what I have explained earlier.
I accidentally deleted my drupal 8 files. But my database is not damaged right now. Is there anyway I can bring my site back to live.
What I did: I have my site old backup [only files]. Copied those backup to root folder replaced database credentials in settings.php. But no luck.
Any other way to bring back my site live from database.
If you have drush you try with
drush sql-cli < my_directory/my_drupal8_dump.sql
So, in you backup files just run this command, not need to update settings.php
Thanks in advance for any help, you guys are awesome!
A previous web developer made a backup of the site in question to the server months ago, and the permissions for this backup are 600. I can't change the permissions or download the file, although I can still move it between folders.
I've read having low disk space is sometimes the problem, but in this case there are 2 GB left, so that should be fine.
There is an other way to download backup from server to local machine, if you are able to move backup file in folders then move it to your website's home directory like '/home/user/public_html/backup.zip' and then browse it in browser and download the backup file.
http://yourdomain.com/backup.zip
It will provide you download option.
Currently I'm developing a control website for my home server. The server has LDAP setup for Mac's to login. The home directories are also on the server. I want to create a backup tool for my family, so they can backup while I'm off. I don't want to do this scheduled (at least not allways, since they must be able to start a backup right away).
I got stuck when I was trying to find a way to run the rsync commands as a privileged user.
I've got some ideas on this but I would like to hear the cons and pros of the options.
Create simple deamon that runs as root and backup's folder -arg1 to -arg2 minding the old backup in -arg3.
Run rsync as the logged in user by remembering the users pass at login at the control panel. (Problem: running ps will reveal password).
Create special rsync user (Problem: rsync user can read everything).
The project is located at https://github.com/hermanbanken/ldap-control and this issue is also on GitHub at https://github.com/hermanbanken/ldap-control/issues/1.
sudo is on OSX later versions.
sudo rsync .....
I have a web site on the cpanel(whm), I want to backup whole site and transfer it to another stand-alone server of my own, is that feasible? how to do it?
If the new server doesn't have cPanel I don't think there is a method of recreating automatically the account, so just try to run /scripts/pkgacct user(if you have root on cPanel server) or just use cPanel -> Backups -> Download or generate a full website backup.
Copy archive to the new server and start to manually recreate account, databases, etc.
Archive contain all the informations you need like dnszones, mysql databases, homedir.tar(all the files from /home/user), etc.
Yes! its easy!
Login to WHM
On the left there is Search box type Backup and click on Backup Configuration (OR go to Backup >> Backup Configuration)
Change Backup Status to enable
Check the options as per your requirement & at the end of page find Additional Destinations there might be drop down OR check box for FTP server click on that
FTP details of another server where you want to store all of your backups.
Hope it helps!