How to remove/delete CSS script from directory
Hi,
it's clear to me how to upload, rewrite or execute the script on CSS.
copy ftp myaccount disable-sticky.txt script disable-sticky
script play disable-sticky
but, I could not find out how to delete the script from CSS script directory.
Regards,
Vladimir
Hi Vladimir,
Use the clear command.
clear {log filename|script filename|archive filename|
startup-config}
Use show disk to get the slot number (probably 0) and then do:
clear 0 script disable-stciky
You need to be in superuser mode to do this.
HTH
Cathy
Similar Messages
-
How to remove(Delete) multiple agents from SCOM console
Hello Experts,
We are using scom 2012 and monitoring around 10000 agents in our environment. Now Windows team decomissioned around 1000 server/clients and we need to remove those agents(grayed agents) from console.
It is very difficult to find and delete the agent one by one. Is there any script to remove/delete the agent from console?
Thanks in advance.
Regards
KarthickHi,
In addition,several ways to remove SCOM agent if SCOM console fails.
1. Add/Remove Programs (appwiz.cpl)
2. Run (MsiExec.exe /uninstall {E7600A9C-6782-4221-984E-AB89C780DC2D} /quiet)
3. psexec -d MsiExec.exe /uninstall {E7600A9C-6782-4221-984E-AB89C780DC2D} /quiet *
Here are some links about using PowerShell remove Agents:
- http://support.micro...b/2626752/en-us
- http://technet.micro...y/hh545186.aspx
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
How to remove deletion of asset from Asset Histrory
Hi Experts
In my project there are some assets created and some transcations are posted and reversed back
since those assets are created by mistake, they should not come into asset history
can you please tell me how to remove those assets from asset histroy
Regards
SreenivasuluHi,
this should be possible by using AS06 and deletinge these assets. Please note you need to set deactivation date in AS02 first.
Hope this helps,
Luana -
How to remove (delete) FB contacts from the contact list.
I'm really new to my new Mac and having a bit of trouble trying to delete all the contacts that were downloaded to my contact list from Facebook. I have tried highlighting one and deleting it that way, but, the 'Remove from Group' doesn't light up.
I tried putting them in a particular group, such as FB contacts, then deleting that group. But, they still remain in the group titles 'All on My Mac'. How do I get them deleted from that group??To turn off Facebook contacts:
1) Go to Contacts
2) Click Group on the top
3) Uncheck All Facebook
Then you shuold just see your regular contacts.
Good luck.
Mr Bill -
How to remove/delete preloaded applications from t...
I found the preloaded apps on Nokia XL after system updated to 1.2.3.1. Using Astro File Manager, go to Phone/preload/app/. The folder contains apps with totally 345.95 MB which it would be better to clear them for more space in internal starage.
Any ideas or solutions to remove them without rooting the phone?
Thanks in advance,
CaptainKantAs of now, pre-loaded applications are not possible to delete/remove.
-
I have all my devices connected to iCloud. I would like a reduced contact list on my iPhone without removing any from my master list on my computer. How do I delete contact numbers from my iphone without disrupting the master list on my computer?
Are you trying to reduce the visual clutter on the phone, save space on the phone, or limit the security exposure if your phone is stolen?
If you are only wanting to reduce the visual clutter and make scrolling through the list faster, you could set up a group on the computer containing only the contacts you want to see on my phone (called, for example, "Show on my Phone") and enable only that group inside Contacts on the phone. You might even have one or more existing groups that you could enable that way (maybe "Family" and "Personal"). -
How to call a shell script from a java code
Hello can any one suggest me how to call a shell script from a java program that takes three parameters.
i have a shell script (msp_restore_gui) when i run this script in the command line in a RHEL5 ,SUSE10 and Debian machine it works fine .I even tested to call it from a java program and it also worked fine but when i used the same in a J2ee application where the user when clicks the restore button in a webserver this inturn sends the request to a java file named BackupManager.java where i call the shell script.But here it fails.Waiting for your suggestions.If you want i can put the code also hereyes the script is in /usr/local/mss/tools/backup and the script (msp_restore_gui) is as follows
#!/bin/sh
TIMESTAMP=`date +%d_%b_%y-%H-%M`
touch /var/backups/mss/mss_restore_"$TIMESTAMP".log
LOGFILE="/var/backups/mss/mss_restore_"$TIMESTAMP".log"
### Explode tgz file
cd /
# Checks to be done:
# root login
# assume he passes the parameter as msp_backup_<timestamp>
# check for the existence of the .tz and fileList.txt
# Checking for the root login and if not logged on as root
# permission will be denied to execute this script
logmsg(){
echo "`date`: $*" >> $LOGFILE 2>&1
echo "$*"
#usage of this script
while [ $# -ne 0 ]
do
case $1 in
-n)
shift
ARCHIVE_NAME=`find / \( -name "$1.tz" -o -name "$1.tgz" \) 2>/dev/null`
FILE_NAME=`find / -name $1_filesList.txt 2>/dev/null`
if [ x$ARCHIVE_NAME = x -a y$FILE_NAME = y ]
then
logmsg "ERROR: Files not found, Restore cannot proceed"
usage
else
tar tvzf $ARCHIVE_NAME > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "ERROR: The tar file $ARCHIVE_NAME is not proper. Restore cannot proceed"
exit 1
else
echo "Backedup files are present, proceeding with restore......" >> $LOGFILE 2>&1
fi
fi
usage
SKIP_CLEANUP=1
STATUS=1
exit
esac
shift
done
rm -rf ./newfile
curr_ver_file="/usr/local/mss/etc/version"
/usr/local/mss/tools/backup/check_version $curr_ver_file $FILE_NAME
ret_code=$?
echo "Exit value of check_version is $ret_code"
if [ "$ret_code" != 0 ]
then
logmsg "MSP Version not matching. Exiting from restore now...."
errormsg=`cat /usr/local/mss/temp/ver_err_mesg`
logmsg $errormsg
rm -f /usr/local/mss/temp/ver_err_mesg
exit 1
else
echo "Version check is successful"
fi
#### ShutDown MSS########
/etc/init.d/mss stop
sleep 2
### Shutdown semm
/etc/init.d/semm stop
sleep 2
rm -rf `grep -v "MSP Version:" $FILE_NAME`
logmsg "MSP restore in progress......"
tar mxvfz $ARCHIVE_NAME >> $LOGFILE
sleep 5
### Call mysql restore script
/usr/local/mss/bin/mysql_alldb_restore.sh >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then
logmsg "Database restore Failed. Cannot proceed further"
exit 1 ;
else
logmsg "Database restore Succeeded."
fi
### Remove DB Dump Files
rm -f /var/lib/mysql-dumps/*
### Trigger cleanup of airprism database tables
#touch /usr/local/mss/airprism/server/config/reinitdb
### Trigger re-import of software packages
touch /usr/local/mss/swdepot/reimport
### Remove log files under the "apps" directory
find /usr/local/mss/apps -name '*.log*' | xargs rm -f
find /usr/local/mss/logs -follow -name '*[._]log*' | xargs rm -f
if [ $? -ne 0 ]; then
logmsg "MSP restore Failed. Cannot proceed further"
exit 1 ;
else
logmsg "MSP restore Succeeded."
fi
# reinstall_patch is touched so that patches are re-installed after restoring of MSP.
touch /usr/local/mss/patch/bin/reinstall_patch
##### Start MSS
logmsg "restarting MSP server "
/etc/init.d/mss start
sleep 5
### Start semm
/etc/init.d/semm start
sleep 5
logmsg "MSP server is now restarted"
my jsp page backup.jsp is as follows
<%@taglib uri="portlet.tld" prefix="uif" %>
<%@taglib uri="msp-console.tld" prefix="msp" %>
<uif:defineObjects/>
<%@page import="javax.portlet.*" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.util.Vector" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="com.symbol.mss.console.admin.backup.BackupManager" %>
<%@ page import="com.symbol.mss.console.admin.system.SystemInfoPortlet" %>
<%
String STYLE_NAME = request.getParameter("style");
if (STYLE_NAME == null) STYLE_NAME = STYLE_DEFAULT;
final String ua = request.getHeader("User-Agent");
BackupManager helper = null;
PortletSession portletSession = renderRequest.getPortletSession();
helper = (BackupManager)portletSession.getAttribute("helper");
if (helper == null) {
//System.err.println("Created new BackupManager");
helper = new BackupManager();
portletSession.setAttribute("helper", helper);
final BackupManager backupManager = helper;
String action = "";
final String backupName = renderRequest.getParameter("backupName");
String completePath = backupManager.getBackupDir() + backupName + backupManager.getBackupFileExt();
if (backupName != null) {
action = "backup";
if(backupManager.backup(backupName)) {
SystemInfoPortlet.beginRestartMSP();
} else {
action = "backuperror";
final String cmd = renderRequest.getParameter("submitButton");
final String selectedBackup = renderRequest.getParameter("selectedBackup");
int tarFileStatus =0;
String backupTarFile ="";
String backupFileList ="";
if ("Restore".equals(cmd)) {
if (selectedBackup != null) {
tarFileStatus = backupManager.verifyTarFile(selectedBackup);
//backupTarFile = backupManager.getRestoreFile(Integer.parseInt(selectedBackup));
//backupFileList = backupTarFile.substring(0, backupTarFile.lastIndexOf(backupManager.getBackupFileExt()))+"_filesList.txt";
if (tarFileStatus == 0){
action = "restore";
backupManager.restore(selectedBackup);
SystemInfoPortlet.beginRestartMSP();
} else {
action = "error";
} else if ("Remove".equals(cmd)) {
backupManager.remove(Integer.parseInt(selectedBackup));
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
PortletURL restoreURL = renderResponse.createActionURL();
%>
<%@ include file="/jsp/core/constants.jspf" %>
<% if (action.length() > 0) {
if ("backup".equals(action))
%>
<p>The MSP Appliance has been shut down in order to create the <%=backupName %> backup file,
and will automatically restart as soon as the file has been created.
To continue your work, please log out of the MSP Console, wait for the appliance
to restart, and then log back in. The amount of time you'll have to wait for the
MSP Appliance to come back online depends on the amount of information you have
stored in the MSP Database.</p>
<p>The full pathname for the backup file is: <%=completePath %></p>
<% }
else if ("restore".equals(action))
%>
<p>The MSP Appliance has been shut down in order to restore from the <%=backupTarFile%> backup file,
and will automatically restart as soon as the restore is complete.
To continue your work, please log out of the MSP Console, wait for the appliance
to restart, and then log back in. The amount of time you'll have to wait for the
MSP Appliance to come back online depends on the amount of information you have
stored in the MSP Database.</p>
<% } else if ("backuperror".equals(action)) { %>
<p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> Errors occurred while taking back up of MSP. Please see the backup service log file for more details.
</P>
<% } else if ("error".equals(action)) {
if (tarFileStatus == 4) { %>
<p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors. This backup can't be restored. Please restore a valid back up.
</P>
<%} else if (tarFileStatus == 3) { %>
<p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file list <%=backupFileList %> is missing. This file is required to restoring backup. Please get the backup file list and proceed with restoring backup.</p>
<%} else if (tarFileStatus == 2) { %>
<p> <img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors and the backup file list <%=backupFileList%> is missing. This backup can't be restored. </p>
<%} %>
<% }
} else { %>
<p><strong>Note</strong>: Both backup and restore will shut down MSP temporarily. MSP will be unable to collect data from devices, send notifications, or provide MSP Console access during this time. When the backup or restore operation is complete, MSP will come back online automatically.</p>
<h3>Backup</h3>
<form action="<%= restoreURL.toString() %>" method="post">
<p>Please provide a name for your backup. MSP will provide the date automatically in the list of backups.</p>
<p><label for="<uif:namespace />backupName">Name</label> <input type="text" name="<uif:namespace />backupName" id="<uif:namespace />backupName" size="20" maxlength="256" /> <input type="submit" name="<uif:namespace />submitButton" value="Back up now" onclick="return <uif:namespace/>validateName()"/></p>
</form>
<h3>Restore</h3>
<p>This will restore all databases (device assets, collected device data, software packages, policies, etc.) to their state as of the time the backup was made. Changes since then <em>except for backups</em> will be destroyed.</p>
<%
Vector restoreList = helper.getRestoreEntries();
Vector restoreDates = helper.getRestoreDates();
Vector restoreVersions = helper.getRestoreVersions();
Vector filesStatus = helper.getBackupFilesStatus();
%>
<% if (restoreList.size() == 0) { %>
<p>There are no backups currently available.</p>
<% } else { %>
<form action="<%= restoreURL.toString() %>" method="post">
<table class="input-radios" id="<uif:namespace />existingBackups">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Date</th>
<th>MSP Version</th>
<th>Remarks </th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4" class="actionsOnSelected">
<input type="submit" name="<uif:namespace />submitButton" value="Restore" onclick="return confirm('This action requires MSP and all related services to be shut down. Console will be unavailable if the request is submitted. The server will restart automatically once restore has been completed.');" />
<input type="submit" name="<uif:namespace />submitButton" value="Remove" onclick="return confirm('This action will remove the backup archive. You will no longer be able to restore this backup. Continue?');" />
</td>
</tr>
</tfoot>
<tbody><%-- First one (most recent) is checked by default. Every other row has class="portlet-section-alternate". Note that each ID must be unique and must match the value of the "for" attribute on the corresponding "label" element. --%>
<%
for (int i = 0; i < restoreList.size(); i++) {
%>
<tr <%= (i % 2 == 1) ? " class=\"portlet-section-alternate\"" : "" %>>
<td><input type="radio" name="<uif:namespace />selectedBackup" value="<%= i %>" id="<uif:namespace />selectedBackup-<%= i %>" <%= (i == 0) ? "checked=\"checked\"" : "" %> /></td>
<td><label for="<uif:namespace />selectedBackup-<%= i %>"><%= restoreList.elementAt(i) %></label></td>
<td><%= dateFormat.format((Date)restoreDates.elementAt(i)) %></td>
<td><%= restoreVersions.elementAt(i) %></td>
<td><%= filesStatus.elementAt(i) %></td>
</tr>
<%
%>
</tbody>
</table>
</form>
<% } %>
<% } %>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
function <uif:namespace/>validateName() {
var name =document.getElementById("<uif:namespace />backupName");
var msg= "<msp:i18n key="BackupMsg"/>";
var str=name.value;
var re = /^[A-Za-z0-9_]+$/;
if (!str.match(re)) {
alert(msg);
name.focus();
return false;
} else {
return confirm('This action requires MSP and all related services to be shutdown. Console will be unavailable if the request is submitted. The server will restart automatically once backup has been completed.');
//--><!]]>
</script>
and my BackupManager.java is as follows where the code in bold and italic is called the restore()
//============================================================================
// Symbol Technologies P R O P R I E T A R Y S O U R C E C O D E
// C O N F I D E N T I A L
// Copyright (c) 2003 Symbol Technologies. All Rights Reserved.
// All information contained herein is the property of Symbol Technologies,
// or its Licensors, and are protected copyrights and trade secrets, and may
// be covered by U.S. patents. Any reproduction or dissemination of any
// portion of this document, of the software, or other works derived from it
// is strictly forbidden unless prior written permission is obtained from
// Symbol Technologies.
//============================================================================
package com.symbol.mss.sdf.services.backup;
import java.io.*;
import java.sql.Time;
import java.text.DateFormat;
import java.util.logging.FileHandler;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;
import java.lang.Process;
import java.util.*;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
import com.symbol.mss.sdf.admin.AdministratorService;
import com.symbol.mss.sdf.backup.*;
import com.symbol.mss.sdf.data.*;
* @author nramaiah
* Service to perform scheduled backups of the system state.
public class BackupManager implements BackupService, DataHandler,
LogEnabled, Configurable {
// MSS Home Path
private static String mssHome = System.getProperty("phoenix.home", File.separator + "usr" +
File.separator + "local" +
File.separator + "mss" +
File.separator);
// Backup related definitions
private static final String BACKUP_LIST_FILE_NAME = "conf" + File.separator + "files_to_backup.txt";
private static final String BACKED_UP_LIST_FILE_NAME_SUFFIX = "_filesList.txt";
private static final String BACKUP_LOCATION = File.separator + "var" + File.separator + "lib" +
File.separator + "mss-backups" + File.separator;
private static final String BACKUP_PARTITION = File.separator + "var" + File.separator + "lib";
private static final String VERIFY_BACKUP = File.separator + "usr" + File.separator + "local" +
File.separator + "mss" + File.separator+"tools"+
File.separator+"backup"+File.separator+"verifyBackup.sh";
// DB backup/restore related definitions
private static final String DB_DUMP_LOCATION = File.separator + "var" + File.separator +
"lib" + File.separator +
"mysql-dumps" + File.separator;
private static final String DB_BACKUP_SCRIPT = "bin" + File.separator + "mysql_alldb_backup.sh";
private static final String DB_RESTORE_SCRIPT = "bin" + File.separator + "mysql_alldb_restore.sh";
// Private variables
private AdministratorService m_admin = null;
private Logger m_logger = null;
private String backupLocation = null;
private String backupListFileName = null;
private String backupPartition = null;
private int backupPartitionLimit = 90;
private String dbDumpLocation = null;
private String dbBackupScript = null;
private String dbRestoreScript = null;
private List servicesBackupList = null;
private String tarFileExtension =".tgz";
private String errFileExtension =".err";
private int exitValue=0;
* Default Constructor
public BackupManager() {
servicesBackupList = new ArrayList();
* Set the administrator service implementation. Link established by Broker service.
* @param admin reference to an implementation of AdministratorService
public void setAdministrator(AdministratorService admin) {
m_admin = admin;
* Set the job publisher service implementation. Link established by Broker service.
* @param jobPublisher reference to an implementation of JobPublisherService
public void setJobPublisher(DataChannel jobPublisher) {
jobPublisher.subscribe(this);
* Gets the backup manager object.
* @return backup manager object
public BackupService getBackupService() {
return this;
* Service lifecycle method.
* @param logger logger object to be used by the service
public void enableLogging(Logger logger) {
m_logger = logger;
* Service lifecycle method.
* @param configuration service configuration object
public void configure(Configuration configuration) throws ConfigurationException {
// Verify MSS Home path
if (!mssHome.endsWith(File.separator))
mssHome += File.separator;
// Get the location where the backup file needs to be placed
backupLocation = configuration.getChild("BackupLocation").getValue(BACKUP_LOCATION);
// Verify backup directory path
if (!backupLocation.startsWith(File.separator))
backupLocation = mssHome + backupLocation;
if (!backupLocation.endsWith(File.separator))
backupLocation += File.separator;
// Get the file listing the files/directories to be backed up
backupListFileName = configuration.getChild("FilesList").getValue(BACKUP_LIST_FILE_NAME);
// Verify backup list file name path
if (!backupListFileName.startsWith(File.separator))
backupListFileName = mssHome + backupListFileName;
// Get the partition where the backups are kept
backupPartition = configuration.getChild("BackupPartition").getValue(BACKUP_PARTITION);
// Verify backup partition path
if (!backupPartition.startsWith(File.separator))
backupPartition = File.separator + backupPartition;
if (backupPartition.endsWith(File.separator))
backupPartition = backupPartition.substring(0, (backupPartition.length()-1));
// Get the limit on the amount of free space on the backup partition
backupPartitionLimit = configuration.getChild("BackupPartitionLimit").getValueAsInteger(backupPartitionLimit);
// Get the location where the DB dump files will be placed
dbDumpLocation = configuration.getChild("DBDumpLocation").getValue(DB_DUMP_LOCATION);
// Verify DB dump directory path
if (!dbDumpLocation.startsWith(File.separator))
dbDumpLocation = mssHome + dbDumpLocation;
if (!dbDumpLocation.endsWith(File.separator))
dbDumpLocation += File.separator;
// Get the name of DB dump backup script
dbBackupScript = configuration.getChild("DBBackupScript").getValue(DB_BACKUP_SCRIPT);
// Verify backup script path
if (!dbBackupScript.startsWith(File.separator))
dbBackupScript = mssHome + dbBackupScript;
// Get the name of DB dump restore script
dbRestoreScript = configuration.getChild("DBRestoreScript").getValue(DB_RESTORE_SCRIPT);
// Verify restore script path
if (!dbRestoreScript.startsWith(File.separator))
dbRestoreScript = mssHome + dbRestoreScript;
* Individual services can supply a list of files/directories to be backed up.
* These are files apart from the files specified in conf/files_to_backup.txt and
* will be backed up as well.
* @param files list of files/directories
public void filesToBackup(List files) {
synchronized(this) {
if (files != null) {
if (files.size() > 0) {
// Add the list contents to the current backup list
for (int i=0; i<files.size(); i++) {
String tStr = (String)files.get(i);
// Check for absolute or relative path
if (tStr.startsWith(File.separator))
servicesBackupList.add(tStr);
else
servicesBackupList.add(mssHome + tStr);
else
m_logger.info("Empty list of filenames. Nothing added.");
else
m_logger.info("Null list of filenames. Nothing added.");
* Individual services can supply a list of files/directories to be backed up.
* Specified files will be added to the file defining the list of files to be backed up.
* @param files list of files/directories
private void persistFilesToBackup(List files) {
synchronized(this) {
if (files != null) {
if (files.size() > 0) {
// Add the list of files provided to the end of file
try {
File file = new File(backupListFileName);
if ((file == null) || (!file.exists()))
file.createNewFile();
// Seek to the end of the file
RandomAccessFile rFile = new RandomAccessFile(file, "rw");
if (rFile != null) {
rFile.seek(rFile.length());
// Write the list contents to the file
for (int i=0; i<files.size(); i++) {
String tStr = (String)files.get(i);
// Check for absolute or relative path
if (tStr.startsWith(File.separator))
rFile.writeBytes(tStr + "\n");
else
rFile.writeBytes(mssHome + tStr + "\n");
else
m_logger.error("Error opening file " + backupListFileName);
rFile.close();
catch (Exception ex) {
ex.printStackTrace();
m_logger.error("Error adding entries to file " + backupListFileName, ex);
else
m_logger.info("Empty list of filenames. Nothing added.");
else
m_logger.info("Null list of filenames. Nothing added.");
* Command to be run during the backup process. Individual services can
* provide shell commands that will be executed before backing up the files.
* @param command shell command to be executed
private void runCommand(String command) {
* Creates a shell script at the specified location that will backup the
* files listed in the List passed in.
* @param scriptFileName location where the script needs to be created
* @param backupFileName name for the tar file being created
* @param backupList list of files to be backed up
private void createBackupScript(String scriptFileName, String backupFileName, ArrayList backupList) throws Exception {
// Create a new StringBuffer to build the contents to be written to the script file
StringBuffer buffer = new StringBuffer();
// Add the initial comment in the start script
buffer.append("#!/bin/sh\n" + "set -x\n\n");
// Check if the partition has enough space
buffer.append("### Check if the partition has enough space\n" +
// "diskUsed=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
" diskUsed=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +
"echo \"Partition " + backupPartition + " is $diskUsed% used.\"\n" +
"if [ \"$diskUsed\" -lt \"" + backupPartitionLimit + "\" ]\nthen\n" +
" echo \"Starting backup...\"\n\n");
// Shutdown semmd
buffer.append(" ### Shutdown semm\n" + " /etc/init.d/semm stop\n" +
" sleep 2\n\n");
// MSP Limited release and earlier builds stop mysql DB and backup the
// /var/lib/mysql directory as it is. Starting MSP 1.0 GA release, mysql
// dump script will be integrated which will create sql scripts to
// restore the database.
// Check if mysql dump creation script exists
File mysqlDumpScript = new File(dbBackupScript);
if (mysqlDumpScript.exists()) {
// MSP 1.0 GA and later releases
// Run the script that will generate sql scripts that would re-create the DB as it is
buffer.append(" ### Call mysql dump script\n" +
" " + dbBackupScript + "\n\n");
else {
// MSP Limited release
// Add command to shutdown mysql
buffer.append(" ### Shutdown mysql\n" + " /etc/init.d/mysql stop\n\n");
// Change to root directory and create the tgz file
buffer.append(" ### Create tgz file\n" + " cd /\n");
// Build up the tar file name from the current date and time
String fileName = null;
if ((backupFileName != null) && (backupFileName.length() > 0))
fileName = backupFileName;
else {
// File name not provided by user, build one using the timestamp
Calendar cal = Calendar.getInstance();
Date date = cal.getTime();
fileName = "MSS-"
+ DateFormat.getDateInstance().format(date).replaceAll(" ", "").replaceAll(",", "")+ "-"
+ (new Time(cal.getTimeInMillis())).toString().replaceAll(":", "").substring(0,4);
String tarFileName = fileName + ".tgz";
// Get the current MSP Version
String mspVersion = getMSPVersion();
// Gather all the files to be backed up. Add them to the tar command and
// also dump them into the file maintaining the list of files being backed up
String listStr = "";
for (int i=0; i<backupList.size(); i++)
listStr += (String)backupList.get(i) + "\n";
// Dump the current MSP version and the list of files being backed up into a manifest file
String listFileName = fileName + BACKED_UP_LIST_FILE_NAME_SUFFIX;
RandomAccessFile file = new RandomAccessFile(backupLocation + listFileName, "rw");
m_logger.info("List of files/directories being backed up:\n" + listStr);
file.writeBytes("### MSP Version: " + mspVersion + " ###\n");
file.writeBytes(listStr);
file.close();
// Add the tar command to the script
buffer.append(" echo \"Creating " + backupLocation + tarFileName + "...\"\n" +
" tar cvhfz " + backupLocation + tarFileName + " `grep -v \"MSP Version:\" " +
backupLocation + listFileName + "`\n\n");
// Check if free space on the backup partition has reduced below the limit
// If enough space left, backup is retained, "mss" is made the owner of the files,
// "backup" is made the group the files belong to,
// permissions changed to be "0660" and
// backup action declared a success
// Else, backup files are deleted and declared a failure
buffer.append(" ### Check if the partition has enough space left\n" +
//" diskLeft=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
" diskLeft=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +
" echo \"Partition " + backupPartition + " is $diskLeft% used.\"\n" +
" if [ \"$diskLeft\" -gt \"" + backupPartitionLimit + "\" ]\n" +
" then\n" +
" ### Failure\n" +
" echo \"Partition " + backupPartition + " does not have enough space.\"\n" +
" echo \"Backup " + backupLocation + tarFileName + " will be removed.\"\n" +
" rm -f " + backupLocation + fileName + "*\n" +
" echo \"Backup Failed.\"\n" +
" else\n" +
" tar tvzf " + backupLocation + tarFileName + " > /dev/null 2>&1\n" +
" if [ ! -s " + backupLocation + tarFileName + " -o $? -ne 0 ] \n" +
" then\n" +
" echo \"MSP Backup operation is not successful. The tar file " + backupLocation + tarFileName + " contains errors.\"\n" +
" echo \"Please take the backup again\"\n" +
" touch "+backupLocation+fileName+".err\n" +
" else \n" +
" ### Success\n" +
" ### Change the owner, group and permissions for the backup files\n" +
" chown mss " + backupLocation + fileName + "*\n" +
" chgrp backup " + backupLocation + fileName + "*\n" +
" chmod 0660 " + backupLocation + fileName + "*\n" +
" echo \"Backup Completed.\"\n" +
" fi\n" +
" fi\n\n");
// MSP Limited release and earlier builds re-start mysql. Starting
// MSP 1.0 GA release, mysql is not stopped and so re-start is not
// needed. sql scripts created by the dump script get packed into
// the tar file and so are deleted.
// Check if mysql dump creation script exists
if (mysqlDumpScript.exists()) {
// MSP 1.0 GA and later releases
// Remove DB dump files
buffer.append(" ### Remove DB Dump Files\n" + " rm -f " + dbDumpLocation + "*\n\n");
else {
// MSP Limited release
// Start mysql
buffer.append(" ### Start mysql\n" + " /etc/init -
How to remove a java script pop up
Hi,
I imported a robohelp document from another company and i am
catering it to my company's needs. The problem is they have popups
which refer to .bmp and it is in java script. If i highlight the
word which has the pop up and remove the popup and then highlight
the normal word again and refer it to my topic in the project
manger; it still refers to their image and not mine. It is strange
but true. I don't know how to remove the java script cos each time
i hover over the highlighted text there are 2 red squares on the
left and right hand side of the word highlighted which i want to
change from their image to mine.
Any help would be much appreciated .
Thanks,
Ramyaplease take a look at this
//--></script></robohelp>
on the <b style="font-weight: normal;">Environmental
Consequence</b> window
captures and displays information that you reported to a
governmental
agency, police, rescue center, or internal company sources.
</p>
<div class=droptext id=POPUP286607275 x-ss-type=dropdown
style="display: none;">
<p class=Graphic style="margin-left: 0in;"><img
src="agency_notification_tab.bmp"
x-maintain-ratio=TRUE class=img_whs2 style="width: 1108px;
height: 120px; border-style: none; border-style: none;"
width=1108 height=120 border=0></p>
</div>
<p class=Body>The following is a description of some of
the fields that
display on the <b style="font-weight:
normal;">Agency Notification</b> tab:</p>
<ul class=whs3 style="list-style: disc;" type=disc>
<li class=p-BulletedList1><p
class=BulletedList1><b style="font-weight: bold;">Reported
By</b> - Person who reported the incident to an agency
or organization.</p></li>
<li class=p-BulletedList1><p
class=BulletedList1><b style="font-weight: bold;">Agencies
Notified</b> - Agencies or organizations notified
about the incident.</p></li>
<li class=p-BulletedList1><p
class=BulletedList1><b style="font-weight:
bold;">Contact</b>
- Contact person at the notified agency or
organization.</p></li>
<li class=p-BulletedList1><p
class=BulletedList1><b style="font-weight: bold;">Notify
Date</b> - Date the agency was
notified.</p></li>
<li class=p-BulletedList1><p
class=BulletedList1><span style="font-weight:
bold;">Comment/Report
Number</span> - This field can be used to record any
comments, notes,
agency report/case numbers associated with the agency
notification. </p></li>
</ul>
<p class=TableText><a href="javascript:void(0);"
onClick="var e; if (parseInt(navigator.appVersion)>=4){e=event;}
if (parseInt(navigator.appVersion) >=2 &&
typeof(PopupMenu_Invoke) == 'function')
PopupMenu_Invoke(e,'','Action
Buttons','../../03_Getting_Started_files/Action_Buttons.htm','Adding
a Row','../../03_Getting_Started_files/Adding_Row.htm','Adding Text
Entries','../../03_Getting_Started_files/Adding_Text_Entries.htm','Deleting
a
Row','../../03_Getting_Started_files/Deleting_Rows.htm','Environmental
Consequence
Record','EC_Environmental_Consequence_Record.htm','Searching by
Personnel
ID','../../03_Getting_Started_files/Searching_by_Personnel_ID.htm','Selecting
the
Time','../../03_Getting_Started_files/Selecting_Time.htm');return
false"
title="Related Topics" id=a2 style="position:
relative;"><img src="../../ss_btn_related_topics1.gif"
alt="Related Topics" style="width: 81px; height: 17px;
border-style: none; border-style: none;"
width=81 height=17
border=0></a><robohelp><script
type="text/javascript"
language=JavaScript1.2><!--
InitEffects('a2');
//--></script></robohelp>
</p>
<script language=javascript1.2
type="text/javascript"><!--
kadovTextPopupInit('a1','POPUP286607275');
//--></script>
if you could paste this code on your word doc and try to
search for .bmp it exactly shows where it is used i tried removing
that line but it acted strange as even when i added a pop up to a
word it does not show anything in the view mode. -
How do you delete a song from a playlist in iTunes?
I feel stupid asking this question but how do you delete a song from a playlist? right clicking doesn't give a menu option to do it, and neither does the file menu. The highlight/delete option doesn't work either.
Also, I've ended up with several copies of the same songs in my library . Can i delete the excess tracks in one go without highlighting them?
Thanks,
DomOption-delete will remove a selected track from a playlist AND the library. Delete will just remove the track from a regular playlist.
Yes, you need to highlight all the songs you want to delete. Sort your library by song title. This should put all the dups together for easy highlighting and deleting. -
How do you delete duplicate songs from an iphone 3gs? I did the automaticly download song feature when doawloading from my CPU and now there are 11 songs that no matter what I do will not come off my phone. I have tried everything. Also how do you shut off this automatic download feature?
Hello momoandfam,
Welcome to Apple Support Communities.
Take a look at the article linked below, it’ll answer your questions about finding and deleting duplicate tracks in your iTunes library.
Find and remove duplicate items in your iTunes library - Apple Support
Take care,
-Jason -
How can i delete some books from ibook?
How can i delete some books from ibook? It says: this book can't be opened. The book is corrupt. I can't open and I can't delete it
I was unable to delete a book sample from my iPhone 5s running iOS 7. This seems to be what worked for me. I went to the Library and clicked "edit" in upper right side of the screen. I then tapped one time on the book I wanted to remove and a blue check appeared at the bottom right corner of that book (presumably you could tap several at a time) Anyway, when the blue check is on the book, you will see in the upper left of the screen the word "Delete" (mine was in red) I clicked that and then a confirming dialog came up from the bottom of the screen with the choices of "delete" or "cancel". I chose "delete" and the book was gone. Hope this helps.
-
hee guys how do u delete a creditcard from your apple id? in the summer a friend of mine connected his own creditcard details to my apple id now i want to disconnect that again but i have no idea how? i just want my own apple id without a creditcard connected to it
I own the movies and I want them to stay in my iTunes library basically forever.
But in both cases the file name no longer shows in the movie list, so I don't know how to re-download it from the Cloud.
iTunes prefs > Store > Show iTunes in the Cloud purchases.
This will show all your iTunes purchases in your library with a cloud icon down arrow. Click the icon to redownload or click on Play to stream without downloading.
Also see this , -> Download past purchases
and techncially, you don't "own" the movie, You simply have a license to use it.
Yet the first thing iTunes does when you hit the delete key is tell you that it will remove the movie forever from all devices and the library.
Actually, no it does not tell you that.
FYI: You should keep copies of all yoru iTnue spurahses as the labels/movie studios/copyright owners can pull their product at anytime and it won't be available to redownload.
Suggestions here -> http://www.apple.com/feedback/ -
How do I delete/hide songs from iTunes Match? (More info inside)
How do I delete/hide songs from iTunes Match? When I mark them, and delete them (and yes, I mark the box where it says delete from the cloud as well), they just reappear once I sync with itunes match again. (the symbol available for download appears). Is there a way to completely remove the tracks?
(And no, I don't just want to hide them (in the menu), since the tracks will appear in my iPhone anyways).Hey imol92,
You may have already looked at this; http://support.apple.com/kb/ht4915
It is all the public information on removing songs that you have uploaded to the iTunes Cloud. -
How can I delete a video from an album on my iPhone 5?
How can I delete a video from my iPhone 5? I created an album and accidentally placed a video in the album and want to delete it. Is it possible to delete a video or picture from an album?
Thanks!How do I delete photos from my Photo Stream in iCloud?
Individual photos cannot be deleted from your Photo Stream. You can, however, delete all the photos in your Photo Stream by clicking the Reset Photo Stream button in your account at icloud.com. The Reset Photo Stream button will instantly delete all Photo Stream photos stored in iCloud, but it will not remove any Photo Stream photos that have already been pushed to your devices."
iCloud: Photo Stream FAQ -
How do I delete a song from my Itunes music library? I follow the instructions and right click on the song and then select "delete" as specified and my info claims at that point it will ask if I want to send this song to my trash bin, but, instead, when I try to delete the song, I get another window asking "are you sure you want to hide this song in iCloud? I don't even know what iCloud is?!?!? I don't want iCloud and just want to get rid of old songs!!! HELP ME!!!
Short answer:
Click Hide Song(s), it is what you wanted to do...
Long answer:
iTunes in the Cloud is a feature of your iTunes store account that allows you to redownload or stream your past purchases. When you delete a purchased track that is downloaded to your computer (like the first one shown here) you are asked if you also want to hide the song from iCloud. This would remove it from the computer and also stop it showing up with the iCloud symbol as the other tracks from that album (which are not downloaded) do.
If a track shows with the cloud symbol you can play (stream) it by double-clicking the title, or click the cloud symbol to download a local copy to your library. If you try to delete one of these tracks you get a slightly different message confirming that you want to hide the track. Clicking hide will remove the listing from the library and any other device that shows your past purchases.
Should you want to retrieve any item hidden in this way at a later date use Store > View My Account > iTunes in the Cloud > Hidden Purchases > Manage.
To hide all your previous purchases that are not downloaded to your computer use Edit > Preferences > Store and untick Show iTunes in the Cloud purchases.
tt2
Maybe you are looking for
-
How to change the sender name "workflow system" to Diff name
Hi ,, How to change the mail sender name that is "workflow system" to different name. Whenever the mail is triggered it shows the sender name as "workflow system" . i want to change the name of the sender..Even i changed the name of the WF-Batch(na
-
Using a Feedback Form FLA in Captivate
To anyone looking for a challenge, I'm a longtime captivate user going back to the RoboDemo days. I've been excited to see its evolution over the last couple of years and recently began a project that required feedback from end users. I've coded a Fl
-
Burn error 2660, 4235, 4000 what's the deal?
Just downloaded latest version of iTunes and now I cannot burn discs. I've gotten error messages 2660, 4235, and 4000. What the heck is going on? Thanks
-
Maintainence View not displaying contents
I have 2 custom tables one is zemployee and other is zdept. The foreign key is Dept No. I went to SE11 and created Maintaince View and done all the necessary steps like Relationships and View Fields. Finally I activated my view. Now when I click on C
-
When I try to execute a winrm -qc command on any Windows 7 domain member computer I receive the following response: Error: Unknown operation name: '' How do I resolve this please?