To compress a file or folder with tar run this: tar -cvf archive-name.tar directory_name To extract a file or folder with tar run this: tar -xvf archive-name.tar
Tag: backup
How to amend the emails from Cpanel backups to the current account
If a customer happens to delete their emails you can still retrieve them from the cpanel backup system. This will take root access to move the files from the backup folder tot he customers account. You can extract a backup archive and copy over the emails to an account’s existing mail directory. If restoring a… Continue reading How to amend the emails from Cpanel backups to the current account
How to back all of your MYSQL databsaes.
You will need the MYSQL root password to run this. mysqldump -u root -p –all-databases > /bsackup/all_dbs.sql This code will drop it off in your /backup partition.
Named, dns, bind, backup or transfer files
Most of the files are in the etc folder. Don’t forget the main dns zone folder: /var/named/
Backup cleaner script for cpanel
#!/usr/bin/perl # cPlicensing.net – scripts Copyright(c) 2003 cPlicensing.net. # All rights Reserved. # support@cPlicensing.net http://cPlicensing.net # Unauthorized copying is prohibited #Version: 0.01 use POSIX; $delete_old = ‘1’; #0 or 1, set to 1 to remove old account backups if($ARGV[0] eq “-d”) { $delete_old = ‘1’; } $|++; POSIX::nice(19); print “Reading Backup Config…”; open(CPBACK,”/etc/cpbackup.conf”) or… Continue reading Backup cleaner script for cpanel