LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Backup Solution (https://www.linuxquestions.org/questions/linux-software-2/backup-solution-788597/)

LazerPhreak 02-11-2010 10:40 PM

Backup Solution
 
Hello all!

I have a rather picky requirement here. This is what I have:

Because MagicJack has no linux support, I have sunk to dedicating one of my servers to windows XP for that purpose (UGGHHHH). However, thats a waste of 2 terabytes. I set up an FTP server on it so I could use it as a file backup location for lack of anything else to use windows for.

I want to:
Backup /home to a in-home ftp server each time the computer is turned on. However, this is where I get stuck.

fwbackups: Requires SSH or SFTP. I dont care about security as this connection is only available in network anyways. There is no external access to the Backup server, and SSHd is a pain in the ASS on windows.

simple backup: Requires you to compress the backup file. I dont want this. I want straight tree backup.

Others: Too difficult to fuck with for such a simple solution.

I think I need to point to a shell script in rc.local, but I want other opinions first. Any ideas?

Elv13 02-11-2010 10:43 PM

Use CIFS or NFS instead of FTP if you are in-house, it will be much easier. With both NFS, FTP and CIFS, you can mount them as folder at boot using fstab, it will make your task easier.

evo2 02-11-2010 10:47 PM

Quote:

Originally Posted by LazerPhreak (Post 3861062)
Because MagicJack has no linux support, I have sunk to dedicating one of my servers to windows XP for that purpose (UGGHHHH). However, thats a waste of 2 terabytes. I set up an FTP server on it so I could use it as a file backup location for lack of anything else to use windows for.

Don't waste a whole machine with windows. Instead install linux on it and then run windows in a virtual machine.

Then you can also use this machine for running backups using whatever linux based backup system you like.

Cheers,

Evo2.

LazerPhreak 02-11-2010 10:49 PM

OK, thanks! but how would I mount a NFS filesystem via terminal?

LazerPhreak 02-11-2010 10:54 PM

Sorry bout that, blonde moment lol. actually more of a rtfm moment....thanks!

chrism01 02-11-2010 11:03 PM

I believe its MS-SFU

LazerPhreak 02-11-2010 11:15 PM

OK, so now I really am stuck. How do I go about setting this up?

These are what I want the script to do.

1) mount C:\FTP\backup Drive on 192.168.1.135 to /mnt/backups

2) copy all files (replacing files as needed, to keep most recent version) to /mnt/backups

Such a simple script, but I'm getting mounting errors, so I need help with the nfs configuration.
Thanks!

LazerPhreak 02-11-2010 11:17 PM

Quote:

Originally Posted by evo2 (Post 3861067)
Don't waste a whole machine with windows. Instead install linux on it and then run windows in a virtual machine.

Then you can also use this machine for running backups using whatever linux based backup system you like.

Cheers,

Evo2.

Find a way for MagicJack to work on a VirtualBox and you will be my hero. Look into it, it's virtually impossible, and the few that have succeeded have the most horrible sound quality. I, myself, put 3 weeks of effort into it.

evo2 02-11-2010 11:47 PM

Quote:

Originally Posted by LazerPhreak (Post 3861099)
Find a way for MagicJack to work on a VirtualBox and you will be my hero. Look into it, it's virtually impossible, and the few that have succeeded have the most horrible sound quality. I, myself, put 3 weeks of effort into it.

Ouch, three weeks. Too bad.

Cheers,

Evo2.

LazerPhreak 02-12-2010 12:33 AM

lol not sure if that was sarcastic but thanks? heres what I did to solve this need:

1) Setup full file sharing on C:\FTP
2) Created this simple script called backup in /usr/bin:
Code:

#!/bin/bash
sudo smbmount //192.168.1.135/c/ftp/backup /mnt/backup -o username=backup,password=ASH46DGHJ,uid=1000,mask=000
cp -rv /home/Documents /mnt/backup/home/kasha/
cp -rv /home/Downloads  /mnt/backup/home/kasha/
cp -rv /home/LimeWire  /mnt/backup/home/kasha/
cp -rv /home/Pictures  /mnt/backup/home/kasha/
cp -rv /home/Videos /mnt/backup/home/kasha
cp -rvn /home/Music  /mnt/backup/

cp -rv /etc /mnt/backup
cp -rv /usr/src /mnt/backup

and this one called backupD in /usr/bin:
Code:

#!/bin/bash
sudo smbmount //192.168.1.135/c/ftp/backup /mnt/backup -o username=backup,password=ASH46DGHJ,uid=1000,mask=000
cp -rv /home/Documents /mnt/backup/home/kasha/
cp -rv /home/Downloads  /mnt/backup/home/kasha/
cp -rv /home/LimeWire  /mnt/backup/home/kasha/
cp -rv /home/Pictures  /mnt/backup/home/kasha/
cp -rv /home/Videos /mnt/backup/home/kasha
cp -rvn /home/Music  /mnt/backup/

then ran:
Code:

sudo chmod +x /usr/bin/backup
sudo chmod +x /usr/bin/backupD
sudo chmod 755 /usr/bin/backup
sudo chmod 755 /usr/bin/backupD

Then I installed gnome-schedule
Code:

sudo aptitude install gnome-schedule
Then in gnome-schedule I set tasks for once a month for backup and once a day for backupD

Voilah! Simple, unsecure (inside the network) file backup :) lol

Elv13 02-13-2010 03:35 PM

Better late than never

to mlunt a CIFS share:
mount -t cifs //IP/shareName /mnt/mountPoint -o username=foo,password=bar

in fstab:

//IP/shareName /mnt/mountPoint cifs default,username=foo,password=bar 0 0


All times are GMT -5. The time now is 04:19 PM.