Tag Info

New answers tagged

0

The way I do it most of the time : bakup, copy to another server and then remove it from the source mysqldump -u db_user -p db_password db_name| gzip > /current/path/for/backups/backup_$(date).sql.gz; #Searching, moving to other server and deleting backup files from source. cd /current/path/for/backups/backup_$(date).sql.gz; for f in *.gz do scp -pr ...


1

If you don't want to store the file at your local machine, you can try something like this: mysqldump -u db_user -p db_password db_name| ssh user@example.com "cat > /path/to/dump.sql" To compress the file before transfer (ssh will also try to compress it's traffic): mysqldump -u db_user -p db_password db_name| gzip | ssh user@example.com "cat > ...


2

You can create a shared folder on destination and mount it on mysql server then give the destination path in the script to that mounted folder. This should work. Alternatively you can initiate a scp connection to copy the conent to destination server.


1

Escape the percent sign, or put that whole line in a script and trigger that instead.


1

So you only back up for crashes? No hardware failures or user errors ever occur? Please tell me you are not responsible for data in a company setup. If so, what would be the best approach? RTFM - the documentation of your virtual host technology. VPS backup is trivial from the host level and supported by every visualization technology ever produced for ...


3

That's exactly the way I handle my Ubuntu backups, I have an image of the server that I update after any major changes, and use Bacula to backup the data files depending on the type of server it is. My restore time using that method is approximately two hours. But it really depends on what your capabilities are and what your requirement are. Ideally you ...


5

The answer depends entirely on your setup: only you know if you are keeping sensitive data elsewhere that would eventually would need to be restored from a backup. To illustrate my point, a couple examples of directories under /var that might require protection from failure (again, depending on your setup, services, etc...): /var/lib/docker ...


-2

If you only want the create tables, then you can do pg_dump -s databasename | awk 'RS="";/CREATE TABLE[^;]*;/'


1

Unfortunately, no. You're probably going to have to: Back up the database. Restore it with a new name. Delete the users and stored procedures out of the new database. Back it up again to a new file. Send the resulting backup file to the other company. You can use this query (found on Stack Overflow) to find the procedures: select * from ...


0

Rsync is a very powerful tool, perfectly capable of doing what you are asking. Simply use the following options: -aAX --numeric-ids, where: -a means "archive", and it implies several other options; -A means "Access Lists", and it is needed to backup the NTFS security descriptors; -X means "Extended Attributes", and it copy any additional meta-stream ...


0

I'm using AWS Command Line Interface. The setup is easy. There are plenty of documentation and examples online. And best of all it is a native tool openly developed by the AWS Team. For example, you can sync a local folder (in your VPS) with a S3 Bucket like this: $ aws s3 sync /local/path/ s3://my-bucket/MyFolder --recursive --exclude '*.log' The ...


1

As for 2) I label a new tape on demand, when Bacula asks me to label one. But if I would know in advance that I will need 10 new tapes on that day then I would label all of them at once. Labelling a new tape is quite a simple thing. You may want to get an overview about your tapes by first by issuing the list volumes command in Bacula console. Unmount the ...


2

as for 1) Label Format = "FS1T${NumVols:p/2/0/r}" # Auto label This command pads with zeroes to 2 digits and puts the variable ${NumVols} (Number of volumes) to the right (r) of the max 2 digits.


0

I've added support for hotcopies to the mysql_manager rubygem, but it only supports hotcopies of the entire mysql directory. It accomplishes this by first doing repetitive rsyncs without table locks until sync duration is tolerable, then obtains a lock using FLUSH TABLES WITH READ LOCK before doing a final rsync. Since it's using rsync, it also supports ...


1

If I recall, rsync will set a non-zero exit code if there are errors. Just write a simple shell script to run your sync and collect stdout and stderr. At the end of the run, check the exit code. If it's zero, it ran successfully and you can exit. If non-zero, send your error email.


0

I have been successfully backing up my Macs to a Linux Server running CentOS via Samba by using SuperDuper! on the Mac. It has a smart update feature which allows incremental backups. The file it creates is not proprietary and can be used with Apple's Disk Utility. SuperDuper! - Can be downloaded and installed for free, and only need to purchase it if you ...


0

The following operations are performed on knoppix (live linux) from terminal. su modprobe nbd qemu-nbd -r -c /dev/nbd0 -f vpc <vhd_file_name> if VHDX fromat qemu-nbd -c /dev/nbd0 -f VHDX <vhdx_file_name> ddrescue -v -f /dev/nbd0 /dev/sda >>>> image to /dev/sda writing only one partition writing qemu-nbd -P 2 -r ...


2

You can use ssh. For example: ssh root@server -c "dpkg --get-selections" > localfile.txt


0

It depends. If you are already booted into the system and need to untar the root filesystem. First create a directory that isn't included in the original filesystem. Move the tarball to that directory and just extract it. If your filesystem is toast, then you'll need to boot into a live CD, mount the hard drive (/dev/sdb or whatever it might be), and then ...


0

if you want to make a backup copy for a list of files: prompt> # backup -ivf /dev/rmt0 file1 file2 file3 ... if you want to backup a filesystem: prompt> # backup -0 -u -f /dev/rmt0 / ( or any other filesystem ) later you´ld restore them using the restore command.


1

If someone gave me a tar archive of a completely failed system and asked me to restore it I would probably do things about like this. Get working hardware Boot working hardware off SystemRescueCd Extract the /etc/fstab from the tar to get an idea of the correct filesystem setup Partition, format, etc the drives and mount them somewhere, maybe /target ...


1

Sounds like you need to boot into a recovery disk, or Debian live CD (https://www.debian.org/CD/http-ftp/#stable), etc. and then restore, but are you certain something less drastic cant be done? Not sure what you are fixing.


0

I know this is an older thread, but still seems pertinent... another thing to consider (although unlikely since the problem was not happening all along) is that the firmware on all of the tape drives should be the same. Levelling the firmware after a drive installation/replacement is a good idea.


0

Seriously? Did you do any research at all? You can use Windows Server Backup to backup Exchange Server 2007. https://technet.microsoft.com/en-us/library/ee221172(v=exchg.80).aspx


0

A "handful" sounds like it cannot be more than 10. And testing sounds like accessing the mailboxes is no problem regarding privacy. Fastest way? Configure a new mailbox, name it "export" or something. Give "export" full access to all mailboxes. Configure Outlook for that "export" mailbox. Open those mailboxes as described here and simply export them to ...


1

yes. it will work. copy: /var/lib/mysql/* /etc/mysql/* then you can create another one VM with mysql and copy back the data.


0

It is probably a similar problem as with SSDs. Removing file from filesystem does not remove the data itself. Just metadata. You need to enable discard (trim) to throw away the data blocks. I have not worked with Rackspace cloud, so I can not tell you if Rackspace storage supports this, or not. Quick googling did not tell. Another thing worth mentioning is ...


0

So I found a solution using a before-job script. I modified the dir.conf adding this line to the job Run Before Job = "/etc/bacula/scripts/purgecurrenttape" and purgecurrenttape is like this. #!/bin/bash #mount the inside-drive tape echo "mount storage=LTO5" |bconsole| grep " " >> /var/log/scrcintas.log sleep 5 #get the name of the mounted tape. ...


1

git bundle is helpful here. I've been using this for a while now: base_dir=/home/git for gitrepo in `ls -d *.git` do echo '**********[' ${gitrepo} ']***********' repo_name=${gitrepo%.git} echo cd ${base_dir}/${gitrepo} cd ${base_dir}/${gitrepo} backup_cmd="git bundle create /opt/git-backups/${repo_name}.bundle master" verify_command="git bundle verify ...


0

The question has been asked here. And the answer is yes it needs more memory, because it has to keep track of which block have been sent and which havent. The amount of memory should be proportional to amount of data in the snapshot transferred. Enabling dedup on the filesystem won't help performance/memory requirements. Enabling SHA256 cheksumms will help ...


0

This is possible with s3cmd 1.5+ (link): $ mysqldump ... | s3cmd put - s3://bucket/file-name.sql


3

This is an alright backup method depending on your needs with some pros and cons. Pros: Easy to create and manage No special software needed to view backups Can backup everything you need easily Cons: Potentially lots of files to back up daily Large data transfer copying the backups over FTP regularly * Time to restore a crashed system potentially ...



Top 50 recent answers are included