Linux: bash script to backup the OS

This is a really simple command/script to backup via rsync an entire Linux OS: #!/bin/bash rsync -aAXv --delete --exclude={"/dev/","/home/","/lost+found/","/media/","/mnt/","/proc/","/run/","/sys/","/tmp/"} / /media/Data_Backup/OS/ Source:

Bash script to backup a Drupal site with an SQLite database

Script to backup via ftp a Drupal site that uses a database SQLite and to then archive it. #!/bin/bash # HOST='' USER='username' PASSWORD='password' BACKUPDIR=$HOME'/backup/site' WORKINGDIR='/tmp' DBPATH='sites/default/files' DBNAME='.ht.sqlite' cd $WORKINGDIR wget -m --preserve-permissions --user=$USER --password=$PASSWORD ftp://$HOST sqlite3 $HOST/$DBPATH/$DBNAME "VACUUM;" while [ $? -ne 0 ]; do wget -m --preserve-permissions --user=$USER --password=$PASSWORD ftp://$HOST/$DBPATH/$DBNAME sqlite3 $HOST/$DBPATH/$DBNAME "VACUUM;" done mkdir -p "$BACKUPDIR" 7z a -mhe -p$PASSWORD "$BACKUPDIR/$HOST-`date +%Y%m%dT%H%M`.7z" "$HOST" rm -r $HOST The script can been executed via cron in this way: 0 20 1 * * bin/ >> bin/cron.log 2>&1

Windows: manually start VMware

Usually VMware automatically start at boot time, to start and stop it manually we can disable the autostart of the following services: VMware Authorization Service VMware DHCP Service VMware NAT Service VMware USB Arbitration Service and we can use a batch script as the following: @echo off echo Start/Stop VMware Workstation services echo. echo 1. Start echo 2. Stop echo. choice /c:12 If...

PowerShell: scripts to check for missing and installed windows updates

These are two scripts for the Windows PowerShell to check for missing and installed windows updates based on this and this . One checks for the missing Windows updates splatting them for Important, Recommended and Hidden. The other checks for the installed Windows updates splatting them for Important and Recommended. They split the updates in Important and Recommended based on how they are setted in the Windows Update Settings. To exeute them you have to unrestrict the PowerShell permissions: Set-ExecutionPolicy Unrestricted To restrict the PowerShell permissions: Set-ExecutionPolicy Restricted

How to delete every post from Facebook timeline

In the last days i decided to remove from the Facebook timeline every thing that i posted but unfortunately there is not a native option to do this. To solve this my problem avoiding to manually delete everything i used a java script: Facebook Timeline Cleaner . As for any java script for the browser to work it needs of an interpreter, GreaseMonkey for Firefox and Tampermonkey for Chrome. This...

Best JavaScript for your browser

Basically, JavaScripts are the prerogative of the creator of an internet site but you can execute them locally so you can change\improve the navigation experience of an internet site. For a long time, the reference site on which to search for any kind of JavaScript was but since it has been closed you can search them on and on . In order to use...

Circuit: applet java to simulate electronic circuits

PSpice is surely the most famous software for electronic circuits simulation. An other good java software, so multiplatform, that can help in pojecting and simulating circuits is Circuit ; a little software really complete and helpful. Here is available its manual.

Shadow Copy: script to manage the shadow copy space on Windows Vista/Windows 7

If you see that the space on your hard disk decreases abnormally do not worry, this is due to Shadow Copy . Shadow Copy is a feature introduced with Windows XP SP1 and allows the creation of manual or automatic backup copies and in Windows Vista and Windows 7 is used by its backup utility, System Restore and Previous Version; By default, the space used by Shadow Copy is 15% of the hard drive on Windows Vista and 5% of the hard drive on Windows 7; this means that for example, under Vista, on a hard disk of 300 Gb Shadow Copy can come to occupy about 40 Gb . Windows give us the possibility to manage this space with some simple command. We can check the space occupied by Shadow Copy with this command: vssadmin list shadowstorage /for=c We can resize the space available for Shadow Copy with...

HP Recovery Manager Reset: script to make more times the recovery discs

As we all know, HP Recovery Manager , the utility for the creation of recovery discs integrated in the computers Hewlett Packard allows you to create recovery discs only once, this is possible thanks to a simple control, when the set of Recovery Disc is created the HP Utility creates some control files in different paths through which the subsequent runs will ensure that he has already created a set of recovery discs. So if we wanted to create a second time our set of recovery discs that we are denied, a message warns that a copy has already been created and the program closes. Officially, the only solution is to contact HP to send off the recovery CD to an amount that is about 40-50 Euros. This happens on the Compaq and HP as HP dv5, HP dv6 e HP dv7 with Windows Vista or Windows 7. So as...
Subscribe to RSS - script