Ubuntu Servers :: Backup Script To Check If A Path Is Mounted?

Mar 6, 2011

I'm writing a script to rsync some directories to external hdd for backup.

My external hdd gets automatically mounted to /media/backup1

My script then backs up predefined directories to /media/backup1.

I have added this script to cron to run once every day.

The problem is that in the case where the drive is not plugged in and the script runs, it backs up to my local hard drive, and since it is more than 70% full, it fills it up by duplicating that 70% onto itself.

I have taken the script further, to test whether /media/backup1 is mounted. If it is, the backup will run. If it is not, it will bail out.

I'm using the mountpoint program to test for mounts.

My script so far:

Code:
#!/bin/bash
if [[ `mountpoint /media/backup1` ]]; then
echo "filesystem mounted"
# The backup function. Commented out for testing.

[Code]....

View 9 Replies


ADVERTISEMENT

Ubuntu Servers :: Best Way To Remote Backup Of Its Server Disk(mounted)?

Dec 20, 2010

Is possible to backup disk(whole) on remote server which is mounted? If yes how,

View 2 Replies View Related

Ubuntu Servers :: Cron Job Backup - External HD No Longer Mounted

Dec 23, 2010

I'm running a cron job every night to dump a MySQL database to an external hard drive. It works, however when I check on it the following morning the external is no longer mounted and the XFS log file is corrupted. If I run

Code:
xfs_repair -L /dev/sdf1
It works, but then I get these issues:
Code:
XFS: Filesystem sdf1 has duplicate UUID - can't mount
I can reset the UUID, but it's difficult to have to do this every day.

View 2 Replies View Related

Ubuntu :: Back In Time To Backup Home Directory To A Second Hdd That Is Mounted At /media/backup?

May 18, 2010

using Back In Time to backup my home directory to a second hdd that is mounted at /media/backupThe trouble is, I can do this using Back In Time (Root), but not using Back In Time without the root option. This is definitely a permissions issue - it can't write to the folder, but when I checked by right clicking on the backup directory and looking at the permission tab, it said I was the owner

View 2 Replies View Related

Ubuntu :: Path Of Iso Mounted Using Archive Mounter?

Jul 15, 2010

O need to enter a file path into a program (happens to be AcidRip DVD Extractor) of a disc that I wish to access. I have a particular ISO image that I'm mounting (happens to be a DVD I want to watch on my TV via a USB drive so I need to rip the DVD to a video file such as xvid), but when I mount it using the Archive Mounter that comes standard in Ubuntu 10.04, I can't figure out where the ^@%! it's mounted or how to set where I want to mount it.

View 9 Replies View Related

Ubuntu :: User File System Check When Mounted?

Sep 1, 2011

A non techie friend has helped an even less techie friend by contacting me by email to discuss an ailing laptop. A few emails were exchanged, with more details, and it was not looking good because it seemed that suddenly the CD drive was not responding, nor any USB devices, the wireless icon was gone, but Ubuntu still seemed to work (for now), with wired ethernet also working. I was struggling to think of what could be done, with the favourite routes of Live CD and Live USB apparently gone.

After a few more hours - another email: 'It's now working! After so many reboots it checked disc for errors and repaired itself! Is there some way of doing that when needed anyway?'I see there is 'Disk Utility', and this would presumably fit the bill, but how does it do checks and repair when the damaged file system is being run, and is currently *mounted*? I thought utilities like fsck(?) could only be run on unmounted file systems? Have I misunderstood the disk utility fs check repair function? And anyway, what might be a good answer to my (nontechie) friend's question 'After so many reboots it checked disc for errors and repaired itself! Is there some way of doing that when needed anyway?'

For the record: (quote) It is a toshiba EA60-155 Model number PSA67E-00300C8J. He put in extra ram to install ubuntu. He thinks he may have deleted something! There is a 'trash' file on his USB drive with loads of stuff in it and he doesn't know how or why but because it won't now read the drive on her laptop we cant replace it! (end quote)

View 3 Replies View Related

Ubuntu Servers :: Mysql-admin Won't Schedule Backup But Will Manual Backup

Jan 19, 2010

I have a scheduled backup to run on our server at work and since the 7/12/09 it has be making 592k files instead of 10Mb files, In mysql-admin (the GUI tool) I have a stored connection for the user 'backup', the user has select and lock rights on the databases being backed up. I have a backup profile called 'backup_regular' and in the third tab along its scheduled to backup at 2 in the morning every week day. If I look at one of the small backup files generated I see the following:

Code:

-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version`

[code]....

It seems that MySQL can open and write to the file fine, it just can't dump

View 3 Replies View Related

Ubuntu :: Backup Snapshots Show Up On The Desktop As Mounted Files?

Jan 20, 2011

I am using Ubuntu 10.04 x86_64. I log in to the machine using nfs. For a problem with mounting my home directory, I had to copy all the contents of my home directory (including all configuration files) from a recent snapshot on to itself. That is, I did something like,

Code:
cp -r /home/user/user /home/user

All of my recent data and program configurations were in /home/user/user. So after the copy operation, I logged out and logged back in again to see that all my configuration and data was restored to what I wanted. But the problem is that now on my desktop I see hundreds of mounted volumes. These are coming from an hourly/weekly snapshot program. The tech support guys for my lab have suggested copying all relevant data to a backup and then deleting the home directory altogether. But I don't want to configure all programs all over again. I think I should be able to get rid of the problem by editing/deleting one or more desktop configuration files. I just don't know which ones. I tried looking around the gconf-editor but was overwhelmed at the amount of information on there.

View 3 Replies View Related

General :: Constantly Check Whether A Cd Is Mounted Or Not Using Bash?

Mar 20, 2010

i need to check if a cd is mounted or not using bash ... how is that possible?

View 8 Replies View Related

Slackware :: Check If Device Is Mounted In A Bash Script?

Aug 1, 2010

Writing a bash script and I need to check if a known HD partition is mounted or not. I do not think /etc/mtab is the place to check. Would /proc/mounts always work? To make it simple like this : cat /proc/mounts | grep /dev/sdb2

View 5 Replies View Related

General :: Java_home - How Check The Path Has Properly Set Or Not

Feb 13, 2011

I have installed jdk1.60_23 i have created a directory named java in root's Home, jdk has installed in jdk1.60_23 directory in java how to set path to compile or run the java file ?

I did like this : export JAVA_HOME=/usr/bin/java/jdk1.60_23/bin export PATH=$JAVA_HOME:/usr/bin/java/jdk1.60_23/bin

How check the path has properly set or not ? how and where create source file of java ? how to compile and run the java source file ?

View 2 Replies View Related

Software :: Backup A Few Servers And A Bunch Of Desktops Onto One Backup Server?

May 10, 2010

Does anyone know of any decent enterprise level backup solutions for Linux? I need to backup a few servers and a bunch of desktops onto one backup server. Using rsync/tar.gz won't cut it. I need like bi-monthly full HDD backups, and things such as that, with a nice GUI interface to add/remove systems from the backup list. I need basically something similar to CommVault or Veritas. Veritas I've used before but it has its issues, such as leaving 30GB cache files. CommVault, I have no idea how much it is, and if it supports backing up to a hard drive rather than tape.

View 7 Replies View Related

General :: CentOS - Disable Disk Check In Mounted USB Drive?

Aug 6, 2010

Is there a way to disable disk checks in a mounted usb drive? I have a 500GB usb mounted drive in my CentOS machine and everytime I reboot my system, it does disk checks which is a long painstaking process.
/mnt/sdb1

View 4 Replies View Related

Red Hat :: Ldap - Unable To Locate Cc - 1 - Or Suitable Replacement - Check PATH Or Set CC

Jun 8, 2010

I was wondering if anyone could be kind to me in providing exact variable to be set for ldpa server installtion.

I am currently installing ldap in linux Red Hat Enterprise Linux AS release 4 (Nahant Update 6) and i get teh following error mesage.

I tried settng exact variable by reffering to ~/doc/install/configure but in vain.

View 4 Replies View Related

Fedora :: Brasero Or K3b Do A Data Check After Burning A Backup Cd?

Dec 30, 2009

I want to have brasero or k3b do a data check after burning a backup cd. I know that in Nero for Windows you just click on the box that says "verify after burning". For brasero I see that you need an md5 file but it will be to tedious to use an md5 utility to make a checksum for every file and then put in in a txt.

View 3 Replies View Related

General :: Backup Laptop With Rsync / Online Check

Dec 31, 2009

I am writing my own anacron script that backs up my most important files from my laptop to my office pc regularly using rsync. However, sometimes my laptop is on when anacron starts the back-up job but my laptop is offline, so that it cannot rsync with my desktop. Is it possible to tell anacron to re-schedule the task to either the next time I'm online again or to some later date (preferably not the next scheduled time, but some time before)?

View 4 Replies View Related

Software :: Gcc Sanity Check Fails After Restore Tar Backup?

Jul 2, 2010

is I've restored a tar.bz2 backup I've made, all fine until it comes to configure/make.the backup was made on my laptop, the transferred to another computer, I used tarxvpf filename
and sure backup was madetar -zcvpf filename / (--exclude=dev etc)dist is lfs,he laptopstill works fine, file date, size, mods all the same so quite pu as to way I get"/lib/gcc failed sanity check"when running .configurep.s. laptop and computer both based

View 2 Replies View Related

Ubuntu Servers :: Backup Multiple Servers ?

Jan 19, 2010

I currently have a group of 3 servers connected to a local network. One is a web server, one is a mysql server, the other used for a specific function on my site (calculation of soccer matches!).

Anyway, I have been working on the site a lot lately but it is tedious connecting my USB hard drive to each computer and copying the files. This means I am not backing up as often as I should...

I have a laptop connected to this same network that I use for development so I can SSH into to the computers, is there any software for ubuntu that can take backups of files that I choose on multiple computers? I know I could rsync but is there something with more or an GUI?

Then I can just every 2 days move the most recent backup from my laptop to the USB drive. Then I will have the backup stored in 2 places if things go kaboom somewhere.

View 9 Replies View Related

Ubuntu Servers :: Mounted NFS Share Will Not Unmount?

Jan 8, 2010

We have a server running Hardy. I configured it as an NFS client and mounted a share. The NFS server is remote and accessed through TCP only (no UDP allowed through the firewall). Now I've mounted it, though, I can't unmount it!

Code:
david@scatha $ mount | grep nfs
example.com:/home/david on /mnt/tmp type nfs (rw,tcp,addr=123.123.123.123)
Now when I try to unmount it:

[Code]...

View 4 Replies View Related

Ubuntu Servers :: Mounted File Share In 10.04 LTS

Sep 13, 2010

I'm having a some pretty weird problems with some mounted file share in Ubuntu Server 10.04 LTS. Currently we are mounting several file share stored on a SLES Files Server onto our Ubuntu Web Servers using the CIFs protocol. Occasionally ( no rhyme or reason ) we will find that when you do a directory listing on the mounted share, while you are on the Ubuntu Server, there are no files being listed. Yet if you browse the SLES File Server or any other of the identical Ubuntu Servers (with the same mounts), the files are there ready to go.

Before using SLES for our file server we tried windows, and experience many of the problem you that you see on the forums of CIFs errors on the console screen. I'm beginning to wonder if 1. we can resolve the CIFs problems in Ubuntu 10, or do we need to down grad to Ubuntu 9 or 3.) change to something other than CIFs.

View 2 Replies View Related

Ubuntu Servers :: NAS Public Folder Not Getting Mounted?

Sep 21, 2010

We have an Iomega StorCenter ix4-200d in our office. for past two days the shared public folder is not getting mounted. but it's working fine through the web interface i.e user can upload/download.that rules out the permissions problems.

I am providing the output of mount command:

t227@t227:/var/log$ sudo mount -t cifs --verbose //192.100.100.37/public /mnt/public/ -o username=shrey
[sudo] password for t227:
Password:

[Code]....

in fact i can't access any of the folder which I am having permissions to rw.but it's working fine through the web interface.

P.S:- On windows also I can't mount the folder.

View 1 Replies View Related

Ubuntu Servers :: Esxi Mounted Drives

Jun 26, 2011

I have ESXI 4.1 installed with Unbuntu Server 11.04, Gnome.I have 8 SATA drives installed they show up in unbuntu as removable media.I wish to share them to my windows users on my lan using.The problem is it will not allow me to change the permissions for the shares and as such when my windows clients try to access the shares they are told asscess denied.Samba will share folders created on my desktop ok, I have tryed sharing a folder in the draws but it still did not work.

View 4 Replies View Related

General :: Difference Between PATH=$PATH:$1 & PATH=$1:$PATH?

Jan 16, 2011

I found the following function in /etc/profile file.

[Code]...

1. I dont undestand what "if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)"" this if statement actually comapres??

2. Also what is the difference between PATH=$PATH:$1 & PATH=$1:$PATH

View 14 Replies View Related

Ubuntu Servers :: CD Into Directory Of Path Available

Apr 13, 2010

I was wondering if we could cd in the directory of the PATH variable. For example, if I type in echo $DISPLAY. It will give me /tmp/launch-3ee4fg/org.x:0
Is there any way that I can just take the value '/tmp/launch-3ee4fg/' from the output of $DISPLAY and exclude out the filename to the end of the command. I tried using the read command and the IFS variable..apparently IFS does not recognise / I guess.

View 2 Replies View Related

Ubuntu Servers :: Have A Sftp:// Mount As Favorite, How To See Where It Is Mounted

Apr 8, 2010

In Nautilus I have a sftp:// mount as favorite, how can I see where it is mounted ?

View 5 Replies View Related

Ubuntu Servers :: Mounted Usb Drive Permissions Stuck On 777

Jun 18, 2010

I am running Ubuntu Server 10.04 LTS with Kernel 2.6.32-22-generic-pae I was originally using usbmount to autmont the western digital external usb drive I had attached to the system and it was working great. However, while I was adding files to the drive i deleted all of the directories and files that came on the drive out of box such as 'autorun.inf' and an autorun directory containing an icon for the drive.. when I rebooted the drive was no longer mounted, I tried to un/reinstall usbmount a few times but it still didnt work, so I wound up adding the drive into my fstab, my fstab line reads like this

[Code]....

View 2 Replies View Related

Ubuntu Servers :: No Path In Smb.conf File

Mar 21, 2010

I successfully shared a subdirectory of my home directory, using GNOME under Ubuntu 8.04 LTS Desktop. What drives me crazy is that I can't find this directory listed in /etc/samba/smb.conf, in a "path" line. Please tell me where is this directory specified, since smb.conf seems to be the only samba config file.

View 5 Replies View Related

Ubuntu Servers :: Can't Change Cgi-bin Path In Apache

Aug 11, 2010

Installed Apache and the default web root was /var/www I wanted to change the cgi-bin to somewhere within the /var/www but I cannot. It only works at /usr/lib/cgi-bin. I am trying to work out the Python CGI to be precise. It works at /usr/lib/cgi-bin but gives a 404 at other places like /home/aj/public_html/cgi-bin or /var/www/cgi-bin.I even tried it with putting a webroot directory in my home directory with a cgi-bin in it and made the changes accordingly in the conf. but the only way it works is when cgi-bin settings point to /usr/lib/cgi-bin otherwise it gives 404.

View 2 Replies View Related

Ubuntu Servers :: UNC Path In Firefox Not Working?

Dec 19, 2010

I setup Dokuwiki (local use only) and have done some testing. The following works under Windows in IE and Firefox: (Firefox needed some tweaks to open local links. no errors in the console)

[URL]

But it does not work in Ubuntu. I get Firefox can't find the file at ///192.168.0.150/images/test.jpg I have to use the locallink plugin, and several clicks, and this syntax for it to work in Ubuntu. [URL] I hate having to open each link using several clicks and even more so, having to make two types of links in my wiki posts! (SMB:// does not work in Windows.)

192.168.0.150 is a WD NAS. I will also be setting up my software RAID 5 that runs on Ubuntu to hold data for clickable in links on the wiki as well. What do I need to do to get Firefox/Ubuntu to be able to click on and use file://///192.168.0.150/images/test.jpg

Wirehsark shows NO PACKETS when I click on the link file://///192.168.0.150/images/test.jpg, so Firefox is not even trying to find the file! [URL] I have tried epiphany and it did not work either. (No packets being sent either.) This seems to be a Linux issue.

View 1 Replies View Related

Ubuntu Servers :: Second Hard Drive (sdb1) Is Not Automatically Mounted?

Mar 4, 2010

I'm running Ubuntu 9.10 64-bit.

For some reason, the second hard drive (sdb1) is not automatically mounted:

rick@rab-1:/mnt$ sudo fdisk -l
Disk /dev/sda: 500.0 GB, 499989348352 bytes
255 heads, 63 sectors/track, 60786 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c17f6

[Code]....

Before I installed Ubuntu, I installed the RAID software to handle 4 500 GB hard drives - so there are supposed to be two mirrored drives. I'm not an expert in using RAID. I'm assuming it is correctly configured. I only "see" two drives. sda has Ubuntu etc. How can I get sdb1 mounted? I've tried using the palimpsest program but I'm afraid I screw it up. Do I need to re-format sdb1?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved