Lost luggage

I have an old Acer Aspire 5742Z laptop, which in the grand scheme of things is known as ‘luggage’. It has a 320 Gb HDD that is probably becoming rather faulty. Both the Windows 7 and Linux Mint installations are crashing regularly and I have since reformatted it to hold Mint alone (no Windows – yay!). But… it still keeps losing data, checking the disk for errors and crashing..

So, let’s Backup any changes..?

I can’t afford a new hard drive for the old beast, so an online or network based backup system to restore the Mint installation with all of the changes  I have made or will make seems to be a super solution.

The Software Manager seems to offer no tempting solution with the terms ‘cloud backup’ or ‘backup’ apart from Dropbox, that I am already using for work data, so I opened the Synaptics Package Manager and searched again. This time I found two likely looking chaps: deja-dup and cinder-backup. So, I duly marked them for installation, applied, entered my root password and waited.

A sense of Deja-vu?

I couldn’t find cinder on my main men, but Deja-dup appeared with the name ‘Backups’, so I clicked on this. It then presented me with a window with 5 options:

  1. Overview
  2. Folders to save
  3. Folders to ignore
  4. Storage location
  5. Scheduling

All seems pretty reasonable. Overview tells me I have no recent backups and none scheduled. Two big hints 🙂

Folders to Save?

I want to do an entire backup of my Mint installation, so that seem to me like everything from ‘/’ (root) downwards. I clicked on the Folders to Save option and navigated to ‘/’ and then clicked ‘Add’. I removed the suggested ‘home’ backup, as I am after a complete system backup.

Folders to Ignore?

The next option is to choose which folders will be ignored from the backup set, and it suggests the Rubbish Bin (fair enough and the contents of my Downloads folder. Hmmm… that will have to go. If I download any PDFs or manuals or anything, I don’t want to lose them on a restore. So I click on ~/Downloads and then the ‘-‘ button and the option disappears.

Storage Location?

This is where you can enter the path to any location for your backup. I am going to use an external hard drive, but you could use a cloud or whatever in this instance. So I click on the ‘Local Folder’ drop-down and choose my external drive. I thne have to enter a path in a text fields so I enter:

/DejaMintBAK

as the path name (and cross my fingers!).

Scheduling?

Under scheduling the Every Week/Month/Day option is greyed out… strange? And the system wants me to save the backup ‘forever’. Ah, I see the problem- there is a big ON/OFF slider at the top of the dialog window and the backup is turned OFF, so I slide this to the ON position. It then gives me the choice of Day/Week for the frequency and I choose ‘Day’. At the moment, whilst I’m configuring the system, and I probably am going to lose everything due to hard drive crash I’m opting for greater security.

How to get it all going?

So, how to get it all happening? I assume that at a certain time a CRON job will kick it into action, but I’d like tosee the first backup happen now to verify that all of the settings are good. Back to the Overview screen, it tells me that the next backup is today and there is a big button for me to press to ‘Back Up Now’! Guess what? I’m going to press the button..!

And it fails… It cannot create the directory: permission denied.

I then create the directory manually  on the external hard drive, and run the Backup again. Fails with the same error message. Hmmm… maybe the ‘/’ option is global and it needs the mount point of the external hard point for an accurate path?

The full path is:

/media/<username>/<External HDD name>/DejaMintBAK

So I enter this into the ‘Storage Location’ text entry box, and (crossing fingers), try again!

Ooh, it looks like it’s working. Now’s it’s asked me for an Encryption Password, so I enter one….and Away it Goes!!

Woohoo!

Follow up – November 2015

Have tried for a few months now and the destination drive I have for backups is also faulty! (rats!) So far… no backup 😦

Advertisements

Linux Mint Beginner’s Guide

OK, I confess. I thought I’d stop searching the net for hints and tips, and bought the ‘Linux Mint Beginner’s Guide‘ by Jonathan Moeller, Azure Flame Media, 2012. It’s pretty cool and I sailed through the first ha;lf with no problems. All clear and only restating what I already knew.

Checking disk status

First I loaded System Monitor from the main menu. This is a GUI tool that shows me the status of my hard drive as well as the processes and resources that I have running. A bit like the old Windows Task Manager. I have used 33% of the HDD space, so I have plenty left. Now, ho to find the process in a terminal.

The top command used in a terminal shows me some really useful information that is updated in real-time. Looking through the processes I can see that there are no Samba (smb*) processes running, so that may explain why I have no sharing on my computer. ‘t‘ sorts the processes by CPU time, ‘l‘ by load average and ‘m‘ by memory used. If I wanted to I could kill a process by taking note of its number (the PID) and typing ‘k <PID>’. To test this, I launched the Image Viewer from the main menu and spotted the brand new process eog pop up in the top list in the terminal window. Cool. It has the PID of 3501. So, typing

k 3501

and then confirming the termination signal, does indeed kill the process. OK, I am armed for bear! ‘q‘ to quit and on with exploration.

df -h

Shows me a list of my attached devices, but I am mainly interested the hard drive which tells me I have 45Gb free and I’ve used 34% of the available space. Hmmm… I may have to use gparted later on to shrink the windows partition further and expand myLinuxx ext4 partition to get more space!

New, Improved Vim – for all those difficult stains!

Now I can learn to use the vi text editor from the terminal for quick and dirty configuration file editing! mwah-ha-ha! Just typing

vi

into the terminal launches a blank vim window; vim being the Improved version of vi. Using vi to call vim has already been established for me by the installation process – cool!

OK, the first problem is that the welcome screen tells me to press ‘q‘ and ENTER to exit vi, but it doesn’t work. OK, my fault – I didn’t read it properly, type

:q

and press enter. No problems. So, let’s try creating a text file by trypeing

vi test.txt

Apparently vi starts in normal mode with PAGE UP/DOWN, HOME & END moving about the file. I type in a dummy sentence to test and find that dw/de (no space) delete the word following the cursor, and d$ deletes to the end of line. OK, that works but I’ve deleted my test line so type some more in. I notice the backspace key doesn’t delete backwards but merely moves the cursor backwards. The cursor keys also do interesting things!!

dd deletes the entire line and p inserts the text from the last deletion at the cursor. Ah ha! So, I haz a copy/paste function! Pressing CTRL-G shows a status line and I can see that the file hasn’t been saved so it doesn’t exist yet. Pressing / for search is a handy way of moving around the document. Now to find out how to save the file.

Command me now!

Apparently I need to move from normal mode to command mode if I want to save the file. More later.

Samba administration on Linux Mint

So, we have out copy of Linux Mint (17.2) installed and it all looks very pretty, but it still isn’t talking to the other computer (Windows or Linux) on the LAN. Let’s try following the tutorial on the Mint site here.

  • An updated fresh Mint installed
  • Grabbed a copy of WINE for future Adobe Flash DRM video viewing with:
apt install wine --install-recommends

The tutorial then gives the following two commands, but I thought I’d check the Webmin site to see if there had been a webmin update (there had) and so changed the version number as seen below.

cd ~/Downloads
wget http://iweb.dl.sourceforge.net/project/webadmin/webmin/1.610/webmin_1.610_all.deb

So the source I changed to

wget http://iweb.dl.sourceforge.net/project/webadmin/webmin/1.760/webmin_1.760_all.deb

right, that’s downloaded the package. Now to get the rest of the supporting libraries:

sudo apt-get update
sudo apt-get install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions libapt-pkg-perl -y

Both updates went through without a hitch. Now, I can go ahead and actually install Webmin:

sudo dpkg -i ~/Downloads/webmin_1.760_all.deb

Woohoo! Looks good, and the installation process also told me that I could login to webmin at https://dibbler:10000/ as root with my root password – ‘dibbler’ is the hostname of my machine. Alternatively, a more generic login would be:

https://localhost:10000/

Old Dibbler gets the panics!

A moment’s panic!! Firefox tells me that old ‘dibbler’ has seen an untrusted connection at this address! What do I do? Well, I’m fairly sure that this is just webmin as directed, so I click ‘I understand the risks’ and it wants me to add an exception to Firefox’s blocking rules. Wavering slightly, I do so and a pop-up does just that!

I chose ‘Get certificate’ and ‘confirm security exception’ – let’s hope those were the right choices!

Well, it all looks good – a login to webmin screen has appeared in my browser. I login as ‘root’ with my root password and go straight into the webmin options. Good grief! Where to start?

Webmin Administration

The first thing I notice on the home screen is that 13 package updates are available, so I click on the link to see if it will update them. Hmmm…. lots of GRUB stuff and some important kernel updates! Seems to be doing them ok… Yay! All good. Return to package list.

Using the Menu I went to Servers>Samba Windows File Sharing. There’s an awful lot of information here that I don’t understand, so I’m going to follow the tutorial steps pretty closely. I looked for ‘Add Samba User by converting a system user’…. In the second block of icons down, called ‘Samba Users’ there was an icon for Convert Users – perhaps this is what I need? I click on it. I checked the radio button for Only listed users or UID ranges, and then Use this password for newly created users.

Looking for the Verify option mentioned int he tutorial, I found the User Synchronisation section and checked the radio boxes for Add a Samba user when a Unix user is added, Change the Samba user when a Unix user is changed and delete the Samba user when a Unix user is deleted. It seemed to make sense that the users were synchronised. So, back to the main sharing menu. As the tutorial says, clicking on Samba Users does indeed show ‘nobody’ and my username.

I then chose to Restart the Samba Servers using the button at the bottom, and it failed! Damn! What now? Back to the tutorial… no help 😦

I restarted the Winbind server with no problem. Perhaps I can restart samba from the command line?

sudo restart smbd
sudo restart nmdb

Which all seems to go ok… but no luck!

Making file shares

Maybe I don’t have anything to share on the network? So, I went to the Create a new share option and selected my Downloads directory as a test but to no avail.

Not giving up yet, I went to the Windows Networking Options section from the main screen, put in my machine’s name as the server name and alias, changed the default service to ‘global’ (in the hope of catching any traffic!) and clicked Save. I used the above two commands to start & stop the service….  still no joy.

I then went to Security And Access Control under File Share Defaults. I changed the share to writeable as I wanted to receive files from other machines, made it accessible to Guests (user: nobody)and clicked save.

Sadly, still can’t get any networking working with either linux or Windows machines…