Some code snippets to help FileProperty fpropData = new FileProperty(“FileData”, new MetaData(), String.Empty, String.Empty); fpropData.MetaData.DisplayName = “File Data”; fpropData.MetaData.Description = “File Data”; this.Properties.Add(fpropData); public static object ToFilePropertyValue(string propName, string filename, byte[] content) { return (new FileProperty(propName, new MetaData(), filename, Convert.ToBase64String(content))).Value; } dr[“File”] = Helper.ToFilePropertyValue(“File”, “foobar.dat”, {foobar byte[]});
Month: October 2012
Removing a File Through SSH
1. Navigate to the folder where the file exists 2. run the command “rm [filename]” 3. Confirm with a “y”
Backup a MySQL Database Through SSH
1. Connect through SSH 2. Navigate to an accessible folder through FTP (eg “cd /var/www/vhosts/[sitename]) 3. Run the command “mysqldump –host localhost –user [username] –password [databasename] > [filename].sql 4. Enter password when prompted 5. View file in FTP viewer in folder and download
Upgrading from Windows Server 2008 R2 to Windows Server 2012
If upgrading a domain controller ensure the following commands are run first. D:\support\adprep\adprep /forestprep D:\support\adprep\adprep /domainprep
Error “psa dead but subsys locked” is shown when check status of Parallels Plesk Panel from the command line
~# /etc/init.d/psa status psa dead but subsys locked ~# Resolution ~# rm -f /var/lock/subsys/psa ~# /etc/init.d/psa start1 Starting Plesk… done ~# Further information: http://kb.parallels.com/6566
How to Restart Plesk
Log on through telnet and run the following command. /etc/init.d/psa restart Done