Technology news and Jobs
Seeking Nerdvana
The Road to Ubuntu - Backup Salvation
Seeking Nerdvana
The Road to Ubuntu - Backup Salvation | The Road to Ubuntu - Backup Salvation |
|
| by Adam Turner | |
| Monday, 05 November 2007 | |
|
Page 3 of 4 I want to keep multiple copies of my backup folder, say every 10 minutes for 48 hours, so I can dip back into previous versions in case I want to recover something I deleted. I know this sounds like overkill but it's a luxury I had when I worked in a newspaper office, and now that I work for myself I don't want to give it up. Featured Whitepaper
5 Best Practices for Smartphone Support
mv ${des}/3 ${des}/4
Folder number 1 becomes 2, 2 becomes 3 and so on. While this worked, it's not very practical if you want to keep hundreds of folders. I did a lot of basic programming on a Commodore 64 as a kid, so I've got an idea of how programs work even if I don't know all of the commands and syntax to use with Ubuntu. I knew I needed a loop and, after a few Google searches, I came up with this;
# Number of copies to keep
It might not look like much, but it did the trick and I was pretty pleased with myself. The problem is I wanted timestamped folders, but I couldn't figure out how to renumber the folders while retaining the timestamp in the name. I took another approach, looking for a way to delete folders according to their age, and found this on howtogeek which deletes folders more than 5 days old;
find /path/to/files* -mtime +5 -exec rm {} \;
Adapting my script, I came up with;
# Source
# Destination
It seemed to work perfectly, but then things went screwy and the folders a being renamed with temp names like 0N47VU~S on the network drive rather than timestamps. Any suggestions would be greatly appreciated, but meanwhile at least my numbered folder system works. With my local backup needs taken care of, it was time to turn my attention to FTP. CONTINUED |
| < Next story in category | Previous story in the category > |
|---|







