Maximum PC

BACKUP SCRIPTS

-

To run a server on TAILS, you need to save your software, web pages, and client keys so they can be restored if necessary. These are saved in the encrypted “Persistent” section of the USB stick (see box over page).

Open Terminal in TAILS, then create a

folder to store backups with mkdir /home/ amnesia/Persistent/tails-server . Next,

run sudo nano /home/Amnesia/ Persistent/ backup.sh and paste in: cp /etc/nginx/sites-available/default / home/ amnesia/Persistent/tails-server/ cp /etc/nginx/nginx.conf / home/ amnesia/ Persistent/tails-server/ cp /etc/tor/torrc / home/amnesia/ Persistent/tails- server/ cp /var/ lib/tor/ hidden_ service/ hostname / home/ amnesia/Persistent/ tails-server/ cp /var/ lib/tor/ hidden_ service/ private_key / home/amnesia/ Persistent/tails-server/ cp /var/ lib/tor/ hidden_ service/client_ keys / home/amnesia/Persistent/tailsserve­r/ chmod -R 0777 /home/amnesia/ Persistent/ tails-server/

echo Done.

Save and exit. Make it executable: sudo chmod a+x /home/amnesia/ Persistent/ backup.sh

Run the backup: cd /home/amnesia/Persistent sudo ./ backup.sh

Now press Ctrl-X, Y, then Enter to save and exit.

Make the script executable with sudo chmod a+x /home/amnesia/Persistent/

backup.sh .

Use cd /home/amnesia/Persistent to switch to the “Persistent” directory, then run a backup with sudo ./backup.sh .

To create the restore script, run the command sudo nano /home/amnesia/

Persistent/restore.sh , and then paste in

the following: apt-get update apt-get install -y nginx-light ufw ufw enable cp / home/amnesia/Persistent/tailsserve­r/torrc / etc/tor/torrc service tor restart service tor stop service nginx stop cp / home/amnesia/Persistent/ tails-server/ default /etc/nginx/sitesavail­able/ cp -f / home/amnesia/Persistent/ tails-server/ hostname /var/ lib/tor/ hidden_service/ cp -f / home/amnesia/Persistent/ tails-server/ private_key /var/ lib/tor/ hidden_service/ cp -f / home/amnesia/Persistent/ tails-server/ client_keys /var/ lib/tor/ hidden_service/ cp / home/amnesia/Persistent/tailsserve­r/nginx. conf /etc/nginx/nginx. conf chown -Rv www-data:www-data /var/ www/ service tor start service nginx start echo Restored.

Save and exit. Make the script executable with sudo chmod a+x /home/amnesia/Persistent/restore.sh . To test, restart TAILS, and run the restore script. Use cd /home/amnesia/Persistent to switch to the “Persistent” directory, then restore the server with sudo ./restore.sh .

Newspapers in English

Newspapers from United States