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 ?