How to Make Backups on VPS Without WHM/Cpanel?

becak

New Member
hello everybody,
Well, recently i have bought a VPS and I got a trial WHM/CPanel with it and i have made the necessary arrangement to shift all my websites on it and i have created their accounts with the trial whm... but now in less than two weeks the trial whm/cpanel will be expired and thus ordering a whm/cpanel addon and he vps will cost me a total of about $40 each month...
facepalm.gif

and my budget does not permit me so
crying.gif


thus I'm searching a solution to make backups without using WHm/cPanel but couldn't find one that i could understand properly as i'm a newbie in this field
tongue.gif
.

so can anybody help me out? Use kloxo. It has inbuilt backup feature via FTP. no i'm not searching kloxo as i don't want to reinstall os...
moreover kloxo has some bugs..
i'm searching a imple way using ssh
sad.gif
without re-installation you can not install a new Control panel.

more over Kloxo is great , give it a try. Well if you cant afford cPanel it would be best for you to use some other control panel i.e kloxo, webmin, you have to reinstall everything.

This way you will always have issues if you use Trial cpanel and its expired.

Still if you wants to get backups take a look at mysql tutorials

http://www.google.gr/search?aq=f&sourceid=chrome&ie=UTF-8&q=backup+mysql++cli

Regards Depends on what you want to backup? Dump the databases to a directory which can't be accessed via http, and tarball it with any other configs etc, gzip it, download.

Code: tar -cf server_backup.tar /home/directorynamegzip server_backup.tarDownload the .tar.gz file to your PC via FTP or another method like rsync, then delete it from the server.

For example, if I had a site in /home/mysite/public_html/... I could dump the database in that /home/mysite, and tarball it all at once.

Code: mysqldump -u username -p databasename > /home/mysite/mysqlbackupcd /hometar -cf backup.tar mysitegzip backup.tarBackup will be at /home/backup.tar.gz to check it's size, ls -alh /home/backup.tar.gz ^ thats all greek to me.

have use kloxo when cpanel was not available... ok E, but here you only explained how to make backup for only a database? but if i want to make a full backup of the site ( the directory itself) is it possible? Then try this for site:

Quote: tar -cf site_backup.tar /
gzip site_backup.tar Sometimes there is a need to backup a CPanel account without logging into the endusers CPanel yourself. In those situations the account can also be backed up via SSH. Every CPanel server comes with scripts that can be executed via SSH. In this case we will use the script: pkgacct
from the /scripts folder on your server.



1. Log into your server by using SSH

* Change to the root user

Code: su – root 2. Change directories to the script directory by executing the following command: Code: cd /scripts 3. Execute the CPanel script for the account backup:

Code: ./pkgacct username(replace the username with the actual acount username that you are going to backup)

The screen output will look similar to this:
Copying domain Config…Done
Copying Mail files….Done
Copying proftpd file….Done
Copying www logs…Done
Grabbing mysql dbs…Done
Grabbing mysql privs…Done
Copying mailman lists….Done
Copying mailman archives….Done
Copying homedir….Done

4. The backup file will be placed in the users home directory.
You can now access the file and copy or move it to your backup drive or download it via ftp.


How to restore a Domain Account via SSH
1. Upload or copy the backup file (Example File Name: cpmove-joeuser.tar.gz) to the domain account Home directory via FTP.

2. Log into your server by using SSH
* Change to the root user
Code: su – root
3. Change directories to the script directory by executing the following command: Code: cd /scripts 4. Execute the appropriate CPanel script for the account restore:
Code: /scripts/restorepkg username(replace username with the domain account username)


(make sure that the file name matches the necessary naming convention – follow the naming scheme seen in our example)
This will restore the domain account from the backup, as well as it will create the CPanel account. We have not tried to do a restore on top of an existing CPanel account yet, but we have heard that this should work just fine. Please test accordingly.



Trasfer Backup to Other server

Code: scp cpmove-user.tar.gz root@newserverip:/home(replace username with the domain account username)

now root Login new server via putty and run this command

Code: /scripts/restorepkg username(replace username with the domain account username)

i hope this help you
 
Top