NASLite Network Attached Storage

www.serverelements.com
Task-specific simplicity with low hardware requirements.
It is currently Thu Mar 28, 2024 7:21 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jan 04, 2007 1:32 am 
Offline

Joined: Thu Dec 29, 2005 9:49 pm
Posts: 14
Location: Brockville, ON
Here's the situation I'm in:

(1) on my wife's desktop linux computer, via a crontab job once a week a tar file was made of /home and then this was copied over to the NASLite server in the basement via ncftp

(2) over time, the size of /home has increased to about 5GB, and the NASLite server handles it well. But if you want to restore a single file, you have to upload to the desktop and unwrap the whole tarball. This can take hours.

(3) Hardware profile:
Pentium-II, 450MHz
192MB RAM (128+64)
# Maxtor 4R120L0, ATA DISK drive
# 240121728 sectors (122942 MB) w/2048KiB Cache, CHS=238216/16/63

(4) changed the backup script so that the backup of /home is made via the script below. THIS COMPLETES SUCCESSFULLY but cannot delete the resulting backup directory (550 Remove directory operation failed)

#! /bin/bash
# ./bin/bkup3 script
# this script is run by /etc/crontab
# copy home folder to a folder with today's date on NAS server
a=$(date +%b_%d_%Y)
ncftpput -mR 192.168.0.5 /Disk-1/laptop/laptopbackup.$a /home

# delete backup folder with 5 week old date in the folder name off of NAS server
# note that this is a separate script using public domain korn shell as the command interpreter
/home/user/bin/ftpscript2

#! /usr/bin/pdksh
# note that this script uses the public domain korn shell as command interpreter
# this script is started by the ./bin/bkup3 script
# ./bin/ftpscript2
# it deletes the remote backup folder with a date 5 weeks ago in the directory name
# then it deletes any old remote backup tar archives with a date 5 weeks ago in the filename

exec 4>&1
ftp -a ftp://192.168.0.5/Disk-1/laptop/ >&4 2>&4 |&

b=$(date --date="5 weeks ago" +%b_%d_%Y)

print -p rmdir ./laptopbackup.$b
print -p delete laptopbackup.$b.tar
print -p bye

(5) Is the problem with how I'm trying to delete old backup directories, or that I don't have enough RAM to fully index them ?
- I'm sure I can boot off (e.g.) a systemrescue.org CD and mount the partition and delete the directories, but that is hardly a process that will happen in the background, is it ?


Top
 Profile  
 
PostPosted: Thu Aug 21, 2008 1:13 am 
Offline

Joined: Thu Dec 29, 2005 9:49 pm
Posts: 14
Location: Brockville, ON
FYI, in case this is useful to others.

By using ncftp rather than ftp, I was able to modify the script so that it deletes directories recursively off the NAS server. Note the -r option is for recursive deletion. This NAS is running NASLite #1.0, kernel 2.4.26

#! /usr/bin/pdksh
# note that this script uses the public domain korn shell as command interpreter
# this script is started by the ./bin/bkup3 script
# ./bin/ftpscript3
# it deletes the remote backup folder with a date 5 weeks ago in the directory name

exec 4>&1
ncftp ftp://192.168.0.5/Disk-1/laptop/ >&4 2>&4 |&

b=$(date --date="5 weeks ago" +%b_%d_%Y)

print -p rmdir -r ./laptopbackup.$b/
print -p exit

wait
exit 0


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group