Hiển thị các bài đăng có nhãn Restore. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Restore. Hiển thị tất cả bài đăng

Thứ Bảy, 22 tháng 3, 2014

Backup and Restore a single table using mysqldump

Backup and Restore a single table using mysqldump

Backup a single table from a database
mysqldump -u -p database_one table_name1 table_name2 table_name3 > /var/www/backups/table_name.sql

Restore the table into another database
mysql -u -p database_two < /var/www/backups/table_name.sql
You can dump a query as csv like this:

SELECT * from myTable
INTO OUTFILE '/tmp/querydump.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
Read More

Thứ Tư, 19 tháng 3, 2014

How to Create/Restore Backup In Kloxo

How to Create/Restore Backup In Kloxo

Backup/Restore is a core part of Kloxo. You can take backup of your entire hosting and you can trivially restore it exactly on another server. In a cluster setup, you can take backup in one cluster configuration, and when restoring, you can tell Kloxo to re-arrange the resources on different servers.
Backup/Restore is also an extremely important aspect of web-hosting, and delivers peace of mind, and in fact, one of the main advantages of having a control Panel on your server.

It is recommended, though not necessary, that both the source and destination Kloxo be the latest version, but Kloxo should be transparently able to handle older versions.To take backup of your entire system:
 


 /script/backup --class=client --name=admin
Kloxo is 100% hierarchical. So if you take the backup of a top level client, automatically every resource under him is included, including his clients, domains, ssl certificates, or whatever resources he has. In the above case, you are taking the backup for admin, which actually includes your entire hosting.

To restore:


#/script/restore --restore --accounts=all <backup-file-path>
To list the contents of a backup file.


#/script/restore --list <backup-file-path>

To restore only certain domains/clients


#cd /usr/local/lxlabs/kloxo/httpdocs/


#lphp.exe ../bin/common/restore.php --restore --accounts=domain:domain.com,client:clientname <backup-file-path>
If you have taken the backup under a specific client, and want to restore under the same client, you can provide the client's class and name via --class and --name respectively. You have to first make sure that this client exists in the system. That is, you have to first add a client with the clientname, and then you can restore the backup under him.

#cd /usr/local/lxlabs/kloxo/httpdocs/

#lphp.exe ../bin/common/restore.php --class=client --name=clientname --restore <backup-file-path>

 
 
Read More