# Backup data on a Failing server



## jdouglas (Sep 17, 2010)

We recently took over supporting a client. This client has a website they were hosting on a 6 year old machine running FreeBSD. Our team has no knowledge of FreeBSD. What we need to do is make a backup of the data and be able to access it on a windows machine to move it to our webhost.

So far I have a frenzyBSD live boot cd to be able to boot into a X GUI and access the many tools available. Will this solution allow me to move this data to a windows accessable drive? 

If not what would be the easiest solution?


----------



## wblock@ (Sep 17, 2010)

sysutils/fusefs-ntfs (ntfs-3g) will give write access to an NTFS filesystem.

But a better way might be to install Cygwin and rsync on one of the Windows machines and use it to copy data from the FreeBSD system.


----------



## cerulean (Sep 17, 2010)

If the server is still live and on the network, I'd either do rsync direct to the webhost (assuming SSH or rsync access)or create a tarball (tar -czf <filename> <files>) and then FTP the files to the webhost. If it is standard configuration, the website files should be in /usr/local/www/ (so something like 'tar -czf webfiles.tgz /usr/local/www/'  should work) .. of course, if you have a database backend, you will need to export the data and migrate.


----------



## jdouglas (Sep 17, 2010)

The machine is no longer part of the current network. We have left it all alone on the original network. We came in and rebuilt the network from scratch.

Lets just say I want to hook up a USB drive (formatted to Fat32) browse for the data and copy it to the USB drive? What would be the best method to do so and what commands would I use to do this? 

I appologize for being such a noob.


----------



## Beastie (Sep 18, 2010)

jdouglas said:
			
		

> Lets just say I want to hook up a USB drive (formatted to Fat32) browse for the data and copy it to the USB drive? What would be the best method to do so and what commands would I use to do this?


If you are not already logged in as root, type su<Enter key> then root's password.

Insert the USB disk and mount it: `# mount -t msdosfs -o large,longnames /dev/da0s1 /mnt`
If this fails, try it without *s1* or try increasing *daX* (if you have other USB storage devices or SCSI disks).
Use `# tail /var/log/messages` if you still cannot find the right device.

Now archive and compress the directories you want: `# tar --one-file-system -cvzf /mnt/directory1-backup.tar.gz /path/to/directory1`
Repeat for every directory, changing /mnt/directory1-backup.tar.gz and /path/to/directory1 accordingly.

When you are done, unmount the disk: `# umount /mnt`

I am not sure about WinZip, but WinRAR should open and extract the files without any problem.


----------

