3
votes
2answers
467 views

How to keep: daily backups for a week, weekly for a month, monthly for a year, and yearly after that

I need to backup data and config files on this server, daily. I need to keep: daily backups for a week weekly backups for a month monthly backups for a year yearly backups after that All of this ...
0
votes
2answers
41 views

Why does system lag or stall after successful completion of tar backup command?

I have a script that runs backup of system files via tar as a cronjob for my server. Every time the script is being fired off, it completed the task as successful. All backups were tested and appeared ...
0
votes
2answers
374 views

Debian backup bashscript

I'm hosting my own web server, and would like to regularly take a backup of my files. So I decided to write a bash script. However, I'm stuck with this: #!/bin/bash # /etc/init.d/backup # version ...
2
votes
2answers
148 views

Progress at fetching large file over sftp

I would like to get large file over sftp. I execute following commands: kopparberg:dev marek$ sftp -P 678 marek@server marek@server's password: Connected to server. sftp> cd backup sftp> get ...
3
votes
2answers
608 views

Backup script to FTP with timed subfolders

I want to make a backup script, that makes a .tar.gz of a folder I define, say fx /root/tekkit/world This .tar.gz file should then be uploaded to a FTP server, named by the time it was uploaded, ...
1
vote
3answers
1k views

Bash script for mysql backup - error handling

I'm trying to backup a bunch of MyISAM tables in a way that would allow me to rsync/rdiff the backup directory to a remote location. I've came up with a script that dumps only the recently changed ...
1
vote
3answers
451 views

Make cron log rsync only if there was transfer

I have this crontab running every 5 minutes: date >> ~/18/rsync.log rsync -vaz user@r18:~/assets ~/18 >> ~/18/rsync.log 2>&1 It adds this to the log file every 5 minutes: Thu ...
3
votes
2answers
2k views

Execute a command when a device is connected via USB

I currently have a system that backs up my Linux server onto a USB storage device on /media/usb. This all works correctly. However, I actually have 2 drives which we try to swap on a daily basis. Is ...
1
vote
3answers
324 views

Faster MySQL DB pull from remote machine into local machine

I use this command to pull some remote db to local db: $ ssh remote.com "mysqldump remotedb | gzip" | gzip -d | mysql localdb I see this runs a bunch of individual commands on the database. Is ...
2
votes
1answer
78 views

Linux - Splitting a backup into two steps

I create a tarball using tar zcf arhive.tar.gz dir/ and this works ok. Now I wanted to split this into two simple archives, one only for images, the other -- for everything else. It seems that ...
0
votes
3answers
346 views

Merge incremental rsync backups

I need to merge my incremental backups into the secure folder (which is the main backup folder) in order of date. Someone has helped with the script to rsync the documents each night via a cron job: ...
6
votes
3answers
1k views

Non-recursive find on linux

I am trying to find all directories that are directly inside the current directory and older than a specific age. The trick is, I only want to consider the age of the immediate descendants of the ...
0
votes
1answer
356 views

Python script take long time to backup folder

I copied this script from some book to make tar.bz2 of some folders for backup. #!/usr/bin/env python import tarfile, os def make_tar(folder_to_backup, dest_folder, compression='bz2'): if ...
1
vote
2answers
143 views

what is the easy way to exclude folders in /home during backup

I am doing backup using for a in /home/* do //do backup done I want to exclude some folders in /home . but for loop takes all folders i there. is there any way so that i can specify exclude list ...
-1
votes
2answers
210 views

Where can i find the advanced home dir backup scripts

Is there any script for linux which can backup the home directories and mysql databases in separate directories . i mean best of all scripts which is general and any one can use that one. By backup i ...
0
votes
0answers
113 views

Simple bash backup solution

I have a very limited experience with shell scripting and would like to put in place some sort of script that backs up my blog (Wordpress) on a weekly basis. Here is what I have so far #!/bin/bash ...
0
votes
1answer
110 views

Problem restoring from tar backup: why are there /dev/disk/by-id/ symlinks and how can I avoid them?

I'm trying to make a bare-bone backup system with the most basic tools available on openSUSE 11.3 (in this case: bash, fdisk, tar & grub legacy) Here's the workflow for my scripts: backup.sh: ...
0
votes
1answer
231 views

How to do rdiff backup restore

How to do rdiff back restore using program ( perl, bash ) Can i get more informatio about rdiff back restore ?
0
votes
2answers
601 views

MySQL rotating backup script - plesk

I have a MySQL backup script I picked up somewhere (can't recall where). It works when I run it manually, but run on cron as root it doesn't run for some reason. There may be a cron log I can check ...
0
votes
1answer
184 views

Bacula and send file list to RunAfterJob script

I have Bacula backup server. And I run sripts before and after backuping, using RunBeforeJob and RunAfterJob. Can I send to script in "RunAfterJob" parameter contained list of backuped files?
-4
votes
1answer
123 views

Incremental backups of Subversion repositories

I have two SVN repositories, svn_rep1 and svn_rep2. I want to back them up to a remote server, with an incremental backup daily and a full backup monthly. How I can write a bash shell script to do ...
1
vote
2answers
109 views

execute bash file daily ? (OS=UNIX)

i want to execute bash file daily at 12:30 for example to make backup to something how i can do it ?? and other one monthly ???? the operating system is Unix
0
votes
3answers
987 views

Making a simple MySQL backup script to be run via cron, having permissions issues

This is a very basic mysqldump script that will do a dump and store it locally. Running mysqldump by itself works fine as does gzip (i.e. they are where they need to be in my path) ...
1
vote
4answers
351 views

Shell MySQL Backups - What's your solution?

I'm looking for a great solution to backup my MySQL databases - all of them. I'd like each one in at least it's own file. I need FTP ability later, but not right now. Right now I just need it to ...
1
vote
1answer
3k views

Postgresql base backup script

I'm using the following script to do a file-level backup of Postgresql. I sometimes see that the last part, to do cleanup after "pgs_backup_stop" is called, hangs while it waits for the last WAL to ...
1
vote
5answers
445 views

selective backup script in bash

I've been using this simple command (that's all I can do :) to backup the whole tree from my user data in NAS server for a year. cp -r /STORAGE /BACKUP-STORAGE/YYYY-MM-DD Unfortunately, after a ...
0
votes
3answers
401 views

Variable directory names over SCP

We have a backup routine that previously ran from one disk to another on the same server, but have recently moved the source data to a remote server and are trying to replicate the job via scp. We ...
1
vote
1answer
765 views

MySQL equivalent to .pgpass, or automatic authentication in a cron job for mySQL

I'm writing a bash script to back up my databases. Most are postgresql, and in postgres there's a way to avoid having to authenticate by creating a ~/.pgpass file which contains the postgres password. ...
2
votes
4answers
696 views

cron script for scheduled backups

i am looking for a cron script which can do some backups. im mostly a web developer so am kind of newbish with bash/cron stuff. i want cron will copy all the files or directories in a "filelist.txt" ...
0
votes
1answer
659 views

Rackspace Cloud API

I am creating bash script to store backup files on Rackspace (mosso). For now i am done with uploading and deleting files from containers. Next step is to remove files older than two weeks (remove ...
1
vote
4answers
909 views

Securing bash scripts

Does anybody know what is the best way to secure bash scripts. I have a script which creates database and source code backup and ftp it to other server. And login/password for destination ftp are ...
0
votes
1answer
1k views

Delete files older than X days from remote FTP server

My backups are stored on remote FTP server. I'm looking for a universal way to clean-up the FTP directory using bash or python. Any help would be appreciated. Edited: I have only FTP access to the ...
2
votes
1answer
79 views

How do I make a backup copy of a file on a nightly basis?

I have a file called 'log.txt' that I would like to move to the logs folder on a nightly basis. The problem is that I want to keep track of the files so I would actually need to move it to a ...
2
votes
3answers
1k views

BASH Shell Scripting assistance, backup script extracts meta data from filename & moves file accordingly

So I need to build a shell script (a skill I am rubbish at, I think too linearly and make everything a pipe) that will connect to a remote machine to a specific directory slurp up all the files older ...