By default the following logs settings are active (contents of /etc/logrotate.d/web/domain.com) #The first line is a template of log-files. /var/www/httpd-logs/domain.com.access.log { olddir /var/www/user/data/logs #Locate archived files into specified directory copytruncate #Create a copy of the original log-file and then reset it. Thus the file won't be deleted. compress #Archive files (gzip is used by default) monthly #Rotate once a day/week/month prerotate #Similar to postrotate, but the operations will be performed before archiving /etc/webanalyzer.d/user/domain.com #Analyze logs endscript } /var/www/httpd-logs/domain.com.error.log { olddir /var/www/user/data/logs copytruncate compress monthly } Start rotation manually /usr/sbin/logrotate -d -f |
Manually Administrator can delete backups in the list of backup copies (the "Delete" button). In ISPmanager Business a user can delete backups in the custom storage. In order to delete a backup copy, in the /usr/local/mgr5 directory you need to specify the BACKUP_TOKEN environmant variable, execute the sbin/backup2_cp --delete command, and specify a path to the info file of the backup copy. The token value is kept in etc/ispmgr.conf in the BackupToken parameter. A storage type and token are stored in etc/ispmgr.conf, the BackupType and BackupToken parameters correspondingly. The following example shows deletion of the backup copy of the certain user (username) from the local storage: BACKUP_TOKEN="type=local;url=/var/backups/";sbin/backup2_cp --delete var/backup/ispmgr/2015-09-08.username.info The following example shows deletion of all copies of the certain user (username) from the FTP storage: BACKUP_TOKEN="password=qwerty12345;type=ftp;url=ftp://backup5.reserv.net;username=ftpuser23"; ls -1 var/backup/ispmgr/*username.info | xargs -I {} sbin/backup2_cp --delete {} sbin/backup2_cp --delete var/backup/ispmgr/2015-09-08.username.info --type local --token /var/backup The following example shows deletion of all copies in the local storage: BACKUP_TOKEN="type=local;url=/var/backups/"; ls -1 var/backup/ispmgr/*.info | xargs -I {} sbin/backup2_cp --delete {} Changing volume size You can change the volume size in the etc/ispmgr.conf configuration file. Example: BackupSliceSize 30M Restoring/downloading file/database Administrator cannot restore files. You should log in as user (in the "Backups" module click the "Enter" button) into the backup copy, select a file(s)/database(s), and click "Restore"/"Download". Starting from ISPmanager Business 5.68.0 (released on 09.08.2016) users can restore/download separate mailboxes. Reserving system data /usr/local/mgr5/etc, /usr/local/mgr5/var and /etc will be archived into archives like F2015-09-16.root.tgz in ISPmanager 5 Lite and F2016-06-11.root#system_localhost.tgz and F2016-06-11.root#system_.tgz in ISPmanager Business. Starting from ISPmanager Business 5.59 the system backup copy will aslo include a mysql databse of the ispmgr master-server. Database dump is made in default encoding and is put into archive like F2016-06-11.root#.tgz. These archives are not available from the panel interface, as they are used very seldom. In order to restore data, go to the storage, e.g. /var/backup. Select a file of the root user archive (usually, root) made on a required date. Execute the commands to view the archive: isptar -l F2015-09-16.root.tgz tar -tf F2015-09-16.root.tgz Example of extraction of the ispmgr.root.dashboard.xml file: tar -zxvf F2015-09-16.root.tgz usr/local/mgr5/var/userconf/ispmgr.root.dashboard.xml |
| In user disk quota You use should have enough disk space for at least one part of backup (by default - 100 MB), because activation is made with user permissions and a part of archive belongs to the user due to security reasons. Changing temporary directory If you need to change a temporary directory, copy the /usr/local/mgr5/var/backup/ispmgr directory and mount a required section in /usr/local/mgr5/var/backup/ispmgr. mount --bind /required/section /usr/local/mgr5/var/backup/ispmgr If you change a patht to the temporary directory, the backup process may cause issues. We don't recommend using the parameter described below: You can add the string into the /usr/local/mgr5/etc/ispmgr.conf configuration file to change a path to the temporary directory path BackupLocalDir Execute killall core IF the killall utility is not present, execute /usr/local/mgr5/sbin/mgrctl -m ispmgr exit Enabling detailed logging To enable detailed logging, add the following strings into etc/debug.conf: backup2.* 9 backup2_import.* 9 backup2_download.* 9 backup2_cp.* 9 restore2.* 9 backup2_cgi.* 9 backup2_conv.* 9 backup2_system.* 9 and execute killall core You can also enable output of all backup logs: tail -f /usr/local/mgr5/var/backup2*log /usr/local/mgr5/var/restore2.log Making a backup copy manually For the current date 1) business: cd /usr/local/mgr5 && ./sbin/backup2_pro & 2) lite: cd /usr/local/mgr5 && ./sbin/backup2 & For a specific date Be careful when providing a date, which is too far from the current date (large than BackupCountLimit/2 weeks)! If you make a copy in the future and the other one with the date, which exceeds the previous date, all the copies might be deleted by the system that checks backup size (even if the future backup copy doesn't contains users). We do not recommend applying the method described unless it is strictly necessary. Be ready for unexpected results! 1) business: cd /usr/local/mgr5 && ./sbin/backup2_pro --date 2016-05-01 & 2) lite: cd /usr/local/mgr5 && ./sbin/backup2 --date 2016-05-01 & |
Aucun commentaire:
Enregistrer un commentaire